• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to resize in border layout?

 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I put a JScrollPane at the WEST side of a JFrame. However, the space allocated for my JScrollPane is fixed. How can i allow this 'WEST' space to be resize by using a mouse?
Any suggestion is welcome.
 
Jeff Smith
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way would be to use a JSplitPane. One way to do it would be to put the component you had on the WEST on the left side of the split pane, then the component you had in the CENTER on the right side of the split pane. Then you could just add the split pane into the CENTER of your BorderLayout.
Jeff
 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeff. It is a good idea. It works fine.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!