Java – JFrame multiple screens

I've been programming for Android, and I use intent to switch between specific screens I've always wondered how to do this in Java when I click a button to switch to a different screen Is there any way to specify multiple jframes, or do I have to delete all objects in a frame and add some?

Solution

You can use CardLayout to "switch content" See how to use CardLayout

Instead of intents in Android, you should use action in Java swing See how to use actions

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>