Results 1 to 2 of 2
Thread: JTable update...
- 01-30-2011, 01:17 PM #1
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
JTable update...
Greetings,
I have been trying to trigger an update when a change on a cell of the JTable.
There are some columns which has a JComboBox as cell editor.
Upon the initializing of the class, I have set the model of the JTable using DefaultTableModel with the proper fields.
After, I have set the JTable with a TableModelListener which triggers any update on the JTable cell.
Your response is highly appreciated.Java Code:JTable table = new JTable(); table.setModel(new DefaultTableModel(...)); table.getModel().addTableModelListener(new TableModelListener() ... );
Thanks,
Cyril H.Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 01-30-2011, 02:25 PM #2
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
I think I have got the answer with regards to updating the cell.
But I have a problem with display the details.
I used DefaultTableModel and override the setValueAt method which triggers a fireTableCellUpdated()
But the problem now is that, the updated data, row won't display anything except "".Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
Similar Threads
-
update jtable?
By realosso in forum New To JavaReplies: 0Last Post: 08-03-2010, 11:31 AM -
update jtable with filter
By simo_mon in forum AWT / SwingReplies: 7Last Post: 06-15-2010, 04:53 AM -
How to update JTable contents
By chyrl in forum AWT / SwingReplies: 10Last Post: 04-17-2010, 05:26 AM -
Update JTable data
By DC200 in forum AWT / SwingReplies: 8Last Post: 03-30-2010, 10:10 PM -
Update the GUI in JTable
By itaipee in forum AWT / SwingReplies: 3Last Post: 04-12-2009, 12:28 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks