Solved

JSplitPane divider movement problem

Posted on 2004-04-21
3
749 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
[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
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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 arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

695 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