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?

4

1 回答 1

2

实现这一点的最简单方法是使用 BorderLayout 而不是“框架”添加面板,然后向其添加框架。因此,当您隐藏“框架”面板时,它会保持其大小。

于 2010-07-13T20:01:38.920 回答