Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Resizing my SplitPane

 
kate damond
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a JFrame containing a SplitPane. On resize of the Frame, I want the proportions of the splitPane to remain constant. This works fine, I have a ComponentAdapter listening out for changes in the size of the frame, and relocating the SplitPane's divider.
However, I need to get somehting to listen to the 'user repositions the divider' event, so I can store the new proportions.
ANy ideas?
Thanks,
Kate
 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
You have to use the setRezeWeight() method.
This method fixes the relative sizes of the two components of the SplitPane.
Hope that helps,
Terry
OOPS! I hadn't read your question properly. If you want to respect the user weights just set a constant that's passed into the above method and have that constant updated with your listener.
[This message has been edited by Terence Doyle (edited December 01, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!