GUI architecture and design in Java (swing)

I spent the last few hours searching the Internet for examples and ideas on how to write medium-sized GUIs in Java I know a little about swing, but that's it Besides swing, I don't know any other way to develop GUI in Java It's also good if you know a different way I also want to write the GUI myself to make it easier to integrate with our games and future refactoring

We have written the whole business logic into the tic tac toe game with multiple functions GUI needs several windows, which can be navigated by using simple buttons on the interface A very rough and dehydrated version I am looking for can be seen below:

The core of my question is:

How to build a GUI using swing and what general design to use?

And some follow-up questions: are there classes in each window? After pressing the button, do I only use setvisible to make my window display and disappear?

"There are any examples you all know (GitHub repos will be great! Happy!), Can this tell me a good GUI architecture / design?

Solution

I think you can create multiple jpanels (or their extensions), put them in a container, use CardLayout, and switch cards if necessary

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
分享
二维码
< <上一篇
下一篇>>