Link to home
Start Free TrialLog in
Avatar of greg_100
greg_100

asked on

JSplitPane divider movement problem

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.
ASKER CERTIFIED SOLUTION
Avatar of Webstorm
Webstorm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zzynx
>> 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
That was a quicky
;)