This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing Number of Column in JTable

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to load number of column in JTable dynamically and i would like to change the name of the each column dynamically. Could any one can help me out.
Thanks in advance,
-Sridharan
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
the TableModel should do what you want. you will have to write your own (that implements the interface TableModel) and provide an appropriate method that returns dynamically the column names. maybe, you'll have to fire an event to update the table.
chantal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic