• Post Reply Bookmark Topic Watch Topic
  • New Topic

Resizing JPanel components  RSS feed

 
Amy Phillips
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a JPanel which sits on a tabbedPane, the panel has a JTree on the left and a JTextArea on the right, both were added using the BorderLayout so are sized to fit. Is it possible to allow the user to adjust the size of the JTree during runtime?
Thanks
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a JSplitPane will do this...
 
Amy Phillips
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nathan that worked nicely
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!