Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to fit JTree to JPanel

 
peter dushkin
Greenhorn
Posts: 2
  • 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
  • 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)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic