A
Andreas Leitgeb
I've got difficulties with JSplitPane:
Some dialog consist of four parts (vertically), with sliders between each.
That was created by a colleague with netbean's form-editor, and works almost
ok. There is one master-JSplitPane, and two inner JSplitPanes and inside
that are the actual components.
Now, "they" want a special behaviour: if the bottom-most component
is hidden (with slider's arrow-buttons on windows), then the other
three components should all grow to fill the available screen-estate,
and if the last one is made visible again, then all the other ones
should shrink equally a little to make room for the last one.
I'm a bit at loss. It seems to do a lot already on closing/reopening
that last part. Things that I can only assume is implemented in the
JSplitPane (as I didn't implement it myself; perhaps that goes auto-
magically based on Components' preferred- and minimum sizes), but it
doesn't propagate that extra space to the upper sibling in the master
JSplitPane. I.e.: only the upper component of the lower inner JSplitPane
gets all the extra space.
How would I better arrange or tweak those SplitPanes such that size-
propagation among the other Components works more "natural"?
I tried to become friends with netbeans, but netbeans obviously refused
my friends-request and misunderstood all my attempts at dragging
components around in the form-editor to the point that even repeated
"undo" didn't restore the old state, but only exiting and restarting
netbeans did. In the end, if I have to restructure the hierachy, I'll
probably have to hand-edit the .form file as well for it to remain
consistent with the .java, in case future colleagues will want to edit
that dialog after me and to whom netbeans is more cooperative.
(freshly installed netbeans 6.1.7 here)
Some dialog consist of four parts (vertically), with sliders between each.
That was created by a colleague with netbean's form-editor, and works almost
ok. There is one master-JSplitPane, and two inner JSplitPanes and inside
that are the actual components.
Now, "they" want a special behaviour: if the bottom-most component
is hidden (with slider's arrow-buttons on windows), then the other
three components should all grow to fill the available screen-estate,
and if the last one is made visible again, then all the other ones
should shrink equally a little to make room for the last one.
I'm a bit at loss. It seems to do a lot already on closing/reopening
that last part. Things that I can only assume is implemented in the
JSplitPane (as I didn't implement it myself; perhaps that goes auto-
magically based on Components' preferred- and minimum sizes), but it
doesn't propagate that extra space to the upper sibling in the master
JSplitPane. I.e.: only the upper component of the lower inner JSplitPane
gets all the extra space.
How would I better arrange or tweak those SplitPanes such that size-
propagation among the other Components works more "natural"?
I tried to become friends with netbeans, but netbeans obviously refused
my friends-request and misunderstood all my attempts at dragging
components around in the form-editor to the point that even repeated
"undo" didn't restore the old state, but only exiting and restarting
netbeans did. In the end, if I have to restructure the hierachy, I'll
probably have to hand-edit the .form file as well for it to remain
consistent with the .java, in case future colleagues will want to edit
that dialog after me and to whom netbeans is more cooperative.
(freshly installed netbeans 6.1.7 here)