This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Changing Number of Column in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Changing Number of Column in JTable" Watch "Changing Number of Column in JTable" New topic
Author

Changing Number of Column in JTable

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Sep 28, 2000
Posts: 508
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing Number of Column in JTable
 
Similar Threads
columnwidth in JTable
JTable
JTable
JTable "..."
JTable