[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
How the fuck do you organize your Java GUI code? Writing every

You are currently reading a thread in /g/ - Technology

Thread replies: 21
Thread images: 4
File: Java_logo.png (7 KB, 259x259) Image search: [Google]
Java_logo.png
7 KB, 259x259
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
>>
File: 1396737505687.jpg (60 KB, 803x726) Image search: [Google]
1396737505687.jpg
60 KB, 803x726
>>53482467
underated
>>
>>53482467
>>53482685

Samefag :^)
>>
File: 2016-03-14-14-14-54-495507164.jpg (6 KB, 259x194) Image search: [Google]
2016-03-14-14-14-54-495507164.jpg
6 KB, 259x194
>>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
Thread replies: 21
Thread images: 4

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK