?
Solved

Restoring the location of JSplitPane's devider?

Posted on 2003-03-02
3
Medium Priority
?
487 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month11 days, 23 hours left to enroll

752 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