Link to home
Start Free TrialLog in
Avatar of abobrikov
abobrikov

asked on

Restoring the location of JSplitPane's devider?

I have the following problem: I want to save and load the position of JSplitDevider.
I have JSplitPane. After I dragged the SplitDevider, I save its position by invoking
getDeviderPosition()
After some actions, I build new JsplitPane and want to put its devider in the location, saved before, so I invoke
setDeviderPosition(), but the devider seems to be set in its preferred position.
What should I do to set it correct.
Thanx in advance.
Avatar of schybert
schybert

Have you checked that the value you save is actually something else than the preferred starting position?

Can you post some code?
Try to call revalidate() on your JSplitPane instance after the call to setDeviderPosition().
ASKER CERTIFIED SOLUTION
Avatar of ksivananth
ksivananth
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial