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.
Java
Last Comment
ksivananth
8/22/2022 - Mon
schybert
Have you checked that the value you save is actually something else than the preferred starting position?
Can you post some code?
Tommy Braas
Try to call revalidate() on your JSplitPane instance after the call to setDeviderPosition().
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Can you post some code?