permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes JTable dialog keeps previously entered values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable dialog keeps previously entered values" Watch "JTable dialog keeps previously entered values" New topic
Author

JTable dialog keeps previously entered values

Carl S.
Greenhorn

Joined: Nov 07, 2006
Posts: 1
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

Joined: Jun 09, 2003
Posts: 4632
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTable dialog keeps previously entered values