aspose file tools*
The moose likes Java in General and the fly likes Need to fit JTree to JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Need to fit JTree to JPanel" Watch "Need to fit JTree to JPanel" New topic
Author

Need to fit JTree to JPanel

peter dushkin
Greenhorn

Joined: Sep 21, 2003
Posts: 2
Hi. Maybe this is a beginner question...
How do you expand JTree so it fits to the JPanel?
I keep getting a little JPanel icon. I am using GridBagLayout/GridBagConstraints.
Thanks,
Peter
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Originally posted by peter dushkin:
Hi. Maybe this is a beginner question...
How do you expand JTree so it fits to the JPanel?

I'm not sure I got your question right, but I can't imagine to fit a JTree to a JPanel.
Instead I use a JScrollpane, so the Tree has a lot of place to grow.
Do you think of resizing font (and icons)?


http://home.arcor.de/hirnstrom/bewerbung
 
Don't get me started about those stupid light bulbs.
 
subject: Need to fit JTree to JPanel