JSplitPane collapsed default state

Hi! I'm wondering how to set a JSplitPane initial state in 'collapsed'. I also need to have a button (other from the widget ones) to collapse/expand the JSplitPane.Thanks!
[188 byte] By [mariano.s.carpentiera] at [2007-11-26 19:18:47]
# 1

> Hi! I'm wondering how to set a JSplitPane initial

> state in 'collapsed'. I also need to have a button

> (other from the widget ones) to collapse/expand the

> JSplitPane.

> Thanks!

try calling this method,

setDividerLocation(double proportionalLocation)

watfora at 2007-7-9 21:34:25 > top of Java-index,Desktop,Core GUI APIs...
# 2
setDividerLocation(...);
itchyscratchya at 2007-7-9 21:34:25 > top of Java-index,Desktop,Core GUI APIs...
# 3
Thanks! It would be usefull, but now I have an other problem. The proportional method is not working fine, and I don't know how to keep the split "minimized" when the Jframe is maximized.
mariano.s.carpentiera at 2007-7-9 21:34:25 > top of Java-index,Desktop,Core GUI APIs...
# 4
setResizeWeight(...);
itchyscratchya at 2007-7-9 21:34:25 > top of Java-index,Desktop,Core GUI APIs...