Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relationship between JTable, TableModel & TableData

Tags:

java

swing

jtable

Whats the relationship between a JTable, TableModel and TableData? If i just modify the TableData, does that also change the data display on the JTable component or I have to call some method to sync the two. I have looked at this, but it does not explicitly tell or show me the relationship in terms of updates

like image 270
n002213f Avatar asked Feb 18 '09 14:02

n002213f


1 Answers

When you change a value in the TableModel data, you must fire this event. eg. changing the value of one cell, you call fireTableCellUpdated(row, col);.

Look at this more specifically.

like image 138
Jérôme Avatar answered Sep 30 '22 15:09

Jérôme