This week's book giveaway is in the Open Source Projects forum.
We're giving away four copies of Eclipse Collections Categorically: Level up your programming game and have Donald Raab on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to resize in border layout?

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jeff. It is a good idea. It works fine.
 
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic