wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JSplitPane not moving divider Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JSplitPane not moving divider" Watch "JSplitPane not moving divider" New topic
Author

JSplitPane not moving divider

Derek Boring
Ranch Hand

Joined: Aug 15, 2006
Posts: 65
I have a JFrame with a JSplitPane in it. The divider will drag to the right, but it will not drag to the left. I can't figure out why. Could someone help me see what i'm overlooking?

Here's the code that creates the split pane and the stuff in it. The left side is a bunch of JLabels and the right side is JTextAreas each in their own JScrollPane. Each side of the split pane has its own JPanel that contains everything. (pnlLeft and pnlRight)



Of course I create each object and put it in it's place in the array, and i assume you won't need to see that but if you do, just ask.

Here is the code that add's everything to the JFrame:


Note that there is a JPanel above the split pane (in the NORTH position of the GridLayout) with a JLabel and JComboBox in it.

As i stated before, the I can drag the divider to the right and it works fine, but it will not drag to the left. It doesn't even show the shadow when i attempt to drag it left.


Life is 10% what happens and 90% how you react to it.
Attitude is everything.
Akhil Jain
Ranch Hand

Joined: Oct 14, 2004
Posts: 74
Please make sure that you have the prefeered size and the minimum size of both the component in splitPane properly set.
Thats the one reason, why it could have had happening.


-------------------------------<br />you can't move ahead, unless you try for it.
Derek Boring
Ranch Hand

Joined: Aug 15, 2006
Posts: 65
Thanks much, fixed it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSplitPane not moving divider