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 th开发者_开发技巧e same size whether the frame is hidden or not?
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.
精彩评论