开发者

Implementing a drop down form in Java Swing

开发者 https://www.devze.com 2023-02-27 03:16 出处:网络
I basically want to have a form that can toggle between a simple and a detailed mode. Whats the best way to go about implementing 开发者_运维问答this in Swing?

I basically want to have a form that can toggle between a simple and a detailed mode.

Whats the best way to go about implementing 开发者_运维问答this in Swing?

Many thanks


Use a BorderLayout. Put the detail panel in the south and make it invisible. Then when you click the "Details" button you set the panel visible and pack() the frame. Or if you don't want the frame to change size then you would need to revalidate() and repaint() the parent container.

0

精彩评论

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