This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes Setting Column Headers in a JTable outside of constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Setting Column Headers in a JTable outside of constructor" Watch "Setting Column Headers in a JTable outside of constructor" New topic
Author

Setting Column Headers in a JTable outside of constructor

Gabriel O'braiden
Greenhorn

Joined: May 19, 2012
Posts: 2
Hi I'm trying to create a Panel that queries a database and updates a JTable. The table headers need to be capable of changing text whenever the language of the application changes (done in a separate dialog).
Right now the table is not being shown in the frame. I'm using tableModel.setIdentifiers to update the text in the header.

If anyone knows what I'm doing wrong here please let me know.

Thanks

Code follows and has been modified so that no database queries are done.

UpdateablePanel.java



ModifiableTableModel.java
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting Column Headers in a JTable outside of constructor