Updating the columnnames i a JTable

Hello

I posted this question in new to java, without much response. Hoping for more here.

I have a class (tm) that implements TableModel. Another class show the JTable using this tablemodel. In the JTable user can change the Strings that is returned by the tm.getColumnName(int col)

, and I was hoping this was reflected in the JTable as well when I did a jTable.updateUI()

, but no. I was advised using JTable.tableChanged(TableModelEvent e)

, and I implemented this unsuccsessfully as jTable.tableChanged(new TableModelEvent(tm))

How can I update the column names in a JTable?

Regard

Fluid

[713 byte] By [Fluida] at [2007-10-2 4:10:50]
# 1
As I understand you want to change column name and don't know how to do it. If I'm right the answer is:table.getColumnModel().getColumn(columnIndex).setHeaderValue("New Column Name");
genga at 2007-7-15 23:34:08 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...
# 2
i write in simple Table in below i i set one button .i changed the value of the table then i click the button means shall i get the changed table value.if u no tell me thanks in advance
Submita at 2007-7-15 23:34:08 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...