user interface - Best way to set up Java GUI -


I am currently working on my first GUI programming project in Java as a school assignment. I have become quite familiar with setting up classes and methods in Java, although with the introduction of GUI programming, I am not sure how best to go about it.

I have established a GUI in my package. Should I create a new class for each JPanel ? I've stopped screenshots that look like my GUI so far.

Any advice on this would be really great

It depends on what you are trying to achieve. For example, I do not necessarily create a separate class for each JPNL. However, if the panel is a custom (override) panel or a panel that contains many other components, or has sufficient functionality, then I will put it in my square. I try to isolate from the functionality, if it makes sense, there is no specific reason why I do it in this way, after writing some gui, it seems that things are simple and very clear. For the above, in your example, without knowing more about your program. I can make a component with a component for components, zeppel, label, and on the first line, in this way I can reuse the component and rewrite the logic.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -