Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Want to Create TreeTable in swings .Please help me out its urgent  RSS feed

 
Praveena Chordia
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I want ot create a table inside tree
I am having Map(String key ,ArayList Value).for each key there should be Root/node in the tree and when click on the root/node then that list should be displayed in the table form with some columns

how can it be possible ..
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most practical way would probably to have a two-panel layout that has the tree on the left and a table on the right. Whenever a node is selected from the tree, the TableModel would be switched to show the appropriate data.
 
Rob Spoor
Sheriff
Posts: 21087
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's how I would do it. One way is to use a JSplitPane, and add the tree to the left and the table to the right. Add a TreeSelectionListener to the tree to be notified when the selection changes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!