• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable in DefaultMutableTreeNode

 
katyayan agrawal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to use a JTable as a node of JTree. The code is :

JTable rulesTable = new JTable(data,columnNames);
category = new DefaultMutableTreeNode("Rules");
rules = new DefaultMutableTreeNode(rulesTable);
category.add(rules);
when I am adding rulesTable in DefaultMutableTreeNode, it is showing string details of JTable, not the Table.
Regards
 
Sudharsan Govindarajan
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you trying to do actually? Why do u need a table as a tree node? Do you want to combine the functionalities of a JTree and JTable?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!