Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable shows previous data

 
Suman Mummaneni
Ranch Hand
Posts: 96
Android Java Mac
  • 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.
 
Craig Wood
Ranch Hand
Pie
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic