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

Problem with JTable  RSS feed

 
Anusha Jv
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to merge two columns in JTable
Pls help me in doing so.

Thanks
Anu
 
Nathanael Ulrick
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there's a quick and easy way to do this.
You'll just have to create a custom TableModel of some sort which will take 2 TableModels and pretend that it's one big one. Still relatively painless, probably < 100 lines.
 
Thomas Suer
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anu!
I have found a lot of examples on this site, also an example of a "groupable table header".
Try this out: http://www2.gol.com/users/tame/swing/examples/JTableExamples1.html
Tom
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!