Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Restoring the location of JSplitPane's devider?

Posted on 2003-03-02
3
Medium Priority
?
495 Views
Last Modified: 2008-02-26
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.
0
Comment
Question by:abobrikov
3 Comments
 
LVL 3

Expert Comment

by:schybert
ID: 8055535
Have you checked that the value you save is actually something else than the preferred starting position?

Can you post some code?
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 8055586
Try to call revalidate() on your JSplitPane instance after the call to setDeviderPosition().
0
 
LVL 26

Accepted Solution

by:
ksivananth earned 165 total points
ID: 8055835
Try to call the validate() method of the container of the JSplitPane after set the setDeviderLocation( val ). FOr e.g., if the "spliterPane" is added to a frame "frame", then,

   spliterPane.setDeviderPosition( 100 ) ;
   frame.validate() ;

Siva
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
The viewer will learn how to implement Singleton Design Pattern in Java.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question