Solved

JSplitPane divider movement problem

Posted on 2004-04-21
3
711 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
allswap challenge 6 99
map related example 6 48
Way to decrease size of apk file 9 69
Which non-HTML GUI front end to use with Java? 3 22
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

777 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