开发者

JFrame multiple screens

开发者 https://www.devze.com 2023-03-23 05:59 出处:网络
I have been programming in Android an开发者_如何学运维d I switch between specific screens using intents. I have always wondered how to do this in Java, when I click a button switch to a different scre

I have been programming in Android an开发者_如何学运维d I switch between specific screens using intents. I have always wondered how to do this in Java, when I click a button switch to a different screen. Is there a way to specify multiple JFrames or would I have to delete all of the objects off one frame and then add some?


You can use CardLayout for "switching content". See How to use CardLayout.

And instead of Intents in Android, you should use Action in Java Swing. See How to use Actions.

0

精彩评论

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

关注公众号