This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTree Problem

 
Meyer Florian
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, this is maybe a very advanced question...
I've got a JScrollPane which view is set to a JTree.
The JTree is as big as the Viewport.
In default case, the TreeNodes of the View (DefaultMutableTreeNode) are showing a JLabel.
Example:
Root
|-Menu1
+-Menu2 <------ This is a JLabel
|-Menu2a <------ This is a JLabel
|-Menu2b
|-Menu3
|-Menu4
In my case, the TreeNodes of the View (DefaultMutableTreeNode) are showing a JTable.
This JTable has one row and a different amount of cells (columns). The Grid is set to invisible etc...
Ok, now my problem is:
How can I fit the JTable's to the viewport-size?
The JTree is as big as the ViewportSize, but the JTable's won't be stretched to the viewport-width.
Anyone got an idea?
Thanks in advance
Florian Meyer
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic