This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTree Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree Problem" Watch "JTree Problem" New topic
Author

JTree Problem

Meyer Florian
Ranch Hand

Joined: Oct 20, 2003
Posts: 62
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTree Problem
 
Similar Threads
DND from JTree to JTable
disabling the view of files in Jtree
Updating a JTree
JTree
Jtable