r/learnjava • u/Necessary_Umpire5919 • Sep 15 '26
For the UI of a 2D point-and-click game, what are the pros and cons of JavaSwing and JavaFX? Are there any other alternatives?
Hi all! I am looking to make a 2D point and click game. My most skilled language is Java from years of high school coding in the console so I was planning on using that, but I'm struggling to actually connect it to a useable interface.
For a high school project, I tried using JavaSwing and absolutely hated it -- I just couldn't get the hang of it no matter what I tried. However, if that's my only available option I may just need to figure it out. I haven't touched JavaFX so I'm not sure if that's better.
Is that the only two possible options or can I use anything else relating to Java? Or for a game like this is Java not even the most optimal? Also I was going to use Unity just because I see everyone use Unity but I honestly don't even know if that's what I should be doing. I'm a bit lost in every way.
Would love to hear feedback, thank you all for the help!!
Edit: Thanks for all the help y'all! For anyone else viewing, the top recommendations were Godot or LibGDX. I appreciate all the help, I'll check out both!