开发者

How do I make dynamic windows in Swing?

开发者 https://www.devze.com 2022-12-22 14:20 出处:网络
I have a general question. I would like to have a window containing some buttons, radio buttons, text fields and so on. So, user can do something (write text, select options and press buttons). As the

I have a general question. I would like to have a window containing some buttons, radio buttons, text fields and so on. So, user can do something (write text, select options and press buttons). As the result of the user activity window should change it structure/appearance some e开发者_开发知识库lement should disappear and some appear.

How do I program such "updates"? Should I close an old window and open a new one or I can modify content of window without closing it?


After adding your components or such, calling revalidate() on your container will do the updates

0

精彩评论

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

关注公众号