How the fuck do you organize your Java GUI code?
Writing every button, label, panel and so on in one method makes everything such a mess.
Is it bad practice to split your GUI into several JPanel classes?
>>53481881
>How the fuck do you organize your Java GUI code?
By using Qt instead of Swing
>Is it bad practice to split your GUI into several JPanel classes?
It's bad practice to use Swing.
(Qt Jambi - Qt for Java)
i recommend to use the MVC-pattern or the MVP-pattern to seperate your GUI from the rest.
I can't see any reason not to split your GUI into several JPanels. make sure, every GUI-based class is inside a gui-named-package to achieve a readable structure.
Try looking into how Scene2D organizes stuff.
Following this guideline I would create a stage and then add actors (panels, buttons, anything) to it and go from there
>>53481892
>QT
>NOT A MEME
>>53481892
>swing considered harmful
>Making GUIs in Java
Tcl/Tk master race reporting in.
>>53482025
This
I always split up my JPanels into separate classes
Try modularizing the GUI components as much as you can, as you program becomes more complex, having everything as decoupled as possible is the difference between success and ragescrapping the code
Using java is bad practise.
Also, swing is maintained by oracle which keeps the best documentation known to man
>>53482467
underated
>>53482467
>>53482685
Samefag :^)
>>53481881
> using java
kek
>>53482696
>:^)
>>53482767
>not knowing that Java owns web app dev
>being poor
kek
>>53482812
>unironically using Swing instead of JavaFX
Why dont you use JavaFX?
>>53482025
>(Qt Jambi - Qt for Java)
This is dead.
>>53481881
AWT or bust