Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable dialog keeps previously entered values

 
Carl S.
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

This is my first post here so please be patient since I'm not sure what code to post and what not to, and thanks for your help before hand!

The problem is:

I have a JTable based dialog. It has rows (x many) and colums (4) set by an XMLTableModel. Each row represents a file on which the user needs to fill in certain values for such as Doc.name, Doc.no. etc (the columns). The files are in col 4. The other cells are editable. This works fine and the output too, BUT if the user wants to do the same again, SOME data is left in the dialogs table.

How do I make sure the table is entirelly clean before next session and what code would any of you need to see to help?

Regards,

Carl
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you create/dispose the dialog initially, then for the next session use
dialog.setVisible(true);

if so, try re-creating the dialog for each session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic