r/javahelp • u/thisismyaccountsmile • May 05 '22
Unsolved Creating a GUI in java
I’ve been out of the programming game for a while, when I was in college i made GUIs with JavaFX. I was wanting to start to make a game just for a hobby, but then I found out the newest JDK no longer supports JavaFX. Was there a better one introduced or did they fall back onto AWT?
19
Upvotes
5
u/wildjokers May 05 '22 edited May 05 '22
JavaFX was decoupled from the JDK so that its development could move at a pace independently from the JDK.
Your options for Java GUI programming are either Swing or JavaFX. Swing is still in the JDK so is very easy to get started with. It also is still a perfectly fine GUI toolkit and has great documentation.
JavaFX takes a bit more to get started with because you have to add it as a dependency and JavaFX getting started docs are completely garbage (makes it appear much harder than it actually is).
Swing uses AWT under the covers but you never want to use AWT directly.