Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Name of the table "On the fly"  RSS feed

 
Angela Laforge
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, how can I allow the user to change the names of columns in a JTable??

This change does not have to be permanent in te DB, but only in the graphics of the program


thank you
 
Divya Kumar
Greenhorn
Posts: 16
Eclipse IDE IntelliJ IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using table renderer it will help
I have done same for combobox item.
 
Rob Camick
Ranch Hand
Posts: 2754
12
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The column names is taken from the TableColumn. So you would need to update the TableColumn:

TableColumn column = table.getColumn(...);
column.setHeaderValue( ... );
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!