Hi all, I'm facing this problem with my Gui, please advise if anyone else has come across same issue. The first time I access my app, I select an origin and destination and correctly populate my JTable. I then perform another search and I see correct data in the JTable, but when I select a row, the table data changes back to the first request data. My Gui class implements just ActionListener and I am extending AbstractTableModel. Am I missing something here?
Joined: Oct 08, 2001
Do you have a method equivalent to the one shown below in your table data model, and do you invoke it after you get new search results?
Joined: Apr 15, 2002
Hi, There is no need keep any reference after the second search where the old searched information can exists. Are u creating multiple instances of your TableModel ?? and by mistake using the older instance of the tableModel to populate the Table.. I think that one of the best practice to populate the table is to create one instance of the table model.. set this model to the Flight table.. Also, Create a public method in your extended table model to update/change the data in the modal. As mentioned by Eugene.
Joined: Jul 18, 2001
Yes Eugene I do just that. Are you using a "Model Manager" class?
Joined: Jul 02, 2001
hi pervej, i think you are adding the Jpanel into the contentPane of your JFrame,make sure you remove the old search reference of your Jpanel from the contentpane,before you add new search reference of JPanel to the contentpane of this JFrame. hope this helps harcharan