Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / September 2005

Tip: Looking for answers? Try searching our database.

JSplitPane only goes down, not up

Thread view: 
William Z. - 20 Sep 2005 21:07 GMT
I've got a vertical JSplitPane with a JPanel on the top and another
JTabbedPane on the bottom.

Top:
I have a GLCanvas (Java OpenGL Bindings) inside a JTabbedPane which is
inside the JPanel on the top (above the divider location).

Bottom:
I have a simple JPanel in each of the tabs of the JTabbedPane on the
bottom (beneath my divider location).

My problem is that, I can always drag my divider location downward to
where it decreases my lower JTabbedPane and increases the hight of the
top JPanel (whether I've got the tab opened w/ my GLCanvas or select
another tab with just a JPanel showing), but I can never drag it
upwards to where it decreases the size of my GLCanvas (or any selected
tab w/ a JPanel) and increases the bottom pane.

Anyone have any ideas on this?
Oliver Wong - 20 Sep 2005 21:11 GMT
> I've got a vertical JSplitPane with a JPanel on the top and another
> JTabbedPane on the bottom.
[quoted text clipped - 15 lines]
>
> Anyone have any ideas on this?

   As a random stab in the dark, is the GLCanvas grabbing mouse events away
from the rest of Swing?

   You might want to post an SSCCE: http://www.physci.org/codes/sscce.jsp

   - Oliver
Vova Reznik - 20 Sep 2005 21:19 GMT
> I've got a vertical JSplitPane with a JPanel on the top and another
> JTabbedPane on the bottom.
[quoted text clipped - 15 lines]
>
> Anyone have any ideas on this?

Check minimum size for top component.
Roedy Green - 21 Sep 2005 00:50 GMT
>Anyone have any ideas on this?

Monitor the preferredSize minimumSize and maximumSize of the
components involved, and see if one is being pig.

use getMimimumDividerLocation and getMaximumDividerLocation to see if
the LAF  is doing you in.

look at getResizeWeight.  Each component may be "happy" with things as
they are and the fat in going to one or the other.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.