File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Dialog updates database - how to update other screens' combos/lists/tables? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Dialog updates database - how to update other screens Watch "Dialog updates database - how to update other screens New topic
Author

Dialog updates database - how to update other screens' combos/lists/tables?

Peter Dennis
Greenhorn

Joined: Nov 30, 2008
Posts: 12
Hi All,

I have a dialog that modifies records within my database. But when I go to a different screen where the combo box has data from that table displayed it isn't updated with the new record that has been added.

If I close my program and restart it then the combo box appears updated but I can't imagine many users wanting to do this on a regular basis.

Is someone able to tell me how I can update the combo boxes/lists/tables on other screens that use this data?

Many thanks,

Peter.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Cant say much with the existing details.
One way of doing it is to obtain a reference to the appropriate combo/list/table model and locally modify it if the DB call is successful.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dialog updates database - how to update other screens' combos/lists/tables?
 
Similar Threads
Transfer data from Access DB to Oracle DB and Vice Versa in a java program
booking Procedure
any idea about JComboBox Modal? with JDBC
Update more than one rows through one Submit/Update Button
combobox is not updating in Swing GUI