JSplitPane to resize a GLCanvas

hello, i am using a JSplitPane to divide a GLCanvas from a Swing-UI.

the user should be able to drag the splitpane in order to give more space to either the GLCanvas or the Swing-UI.

however the resizing with dragndrop only works “away” from the GLCanvas (making it bigger) while it is not possible to drag the splitpane towards the GLCanvas.

does anyone know where the problem could be? thanks!

I dimly remember something like getMinimumSize() is changed on resize. See http://www.java-gaming.org/forums/index.php?topic=10567.0 and http://www.java-gaming.org/forums/index.php?topic=6459.msg62784#msg62784. The latter is somewhat unrelated, but contains an interesting comment:


            // We need to create a Dimension object for the JPanel minimum size to fix a GLCanvas resize bug.
            // The GLCanvas normally won't recieve resize events that shrink a JPanel controled by a JSplitPane.  
            setMinimumSize(new Dimension());    

hooray, this did the trick!

thank you very much, cylab.