Solved

JSplitPane divider movement problem

Posted on 2004-04-21
3
704 Views
Last Modified: 2007-12-19
I'm using a JSplitPane having a JPanel on both the left and right.  When I start out the divider moves perfectly fine in both directions, But when I change the JPanels to something different I am unable to move the to the right. When I use setDividerLocation(.5), it sets the divider where I want, but then when I click to move the divider bar left and right it moves to the right and I can't move it to the left. After it is moved to the right, then I can move the divider bar left and right, but not past where it just was moved to.  is there anyway to allow the divider bar to move all the way left and right.  If not, is there a way to not allow the user to move the divider bar?

Thanks in advance.
0
Comment
Question by:greg_100
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Webstorm earned 250 total points
ID: 10882999
Hi greg_100,

I think you should check the minimum & maximum size returned by the 2 components contained in the JSplitPane.

Can you post the code ?
0
 
LVL 37

Expert Comment

by:zzynx
ID: 10886187
>> when I change the JPanels to something different
You mean you remove the panels and add a new ones to replace them?

Do you perform a

      revalidate();
      repaint();
and
      pack();

on the panel containing the split pane?

>>Can you post the code ?
That would indeed help us helping you
0
 
LVL 37

Expert Comment

by:zzynx
ID: 10887653
That was a quicky
;)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now