开发者

Java resizing my splitter frame

开发者 https://www.devze.com 2023-01-07 05:18 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消