This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JTable shows previous data

Ranch Hand
Posts: 99
Android Mac Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I have problem with my JTable. I have JDialog. which has a JList a JTable and a Ok, Cancle and Help buttons. I am using custom renderes and editor for the JTable. The JTable gets loaded with different models based on the selection on the JList. But the problem is when the user hits the cancel button and invokes the dialog again and selects the previous menu entry then it displays the old value.
Code for the JDialog

The invocation of this dialog is done here.

thanks in advance.
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I stubbed–in the missing classes and got your code running. I am unable to replicate the
situation you described. Each time the dialog opens the list has the items in it and the
table is blank. Selecting any list item loads the table with four rows: the rows with
index of zero and 2 in the right–hand column show the selected list item every time.
Clicking either of the OK or Cancel buttons does not seem to alter the result. I am not
able to get a previously–selected or wrong value in the table.
Hang a left on main. Then read this tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic