views:

15

answers:

1

I have a jDialog with a splitter inside it.

One side has a tree while the other side has a frame. Whenever I use setVisible(false) to hide the frame, the splitter resizes to filled the entire screen with the tree.

Is there anyway to keep the tree side of the splitter the same size whether the frame is hidden or not?

+2  A: 

The simplest way to accomplish that would be adding panel with BorderLayout instead of a "frame" and then adding frame to it. So when you hide the "frame" panel stays and keeps its size.

eugener
Simple and effective.
j flemm