File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to fit JTree to JPanel

 
peter dushkin
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic