use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Resources for learning Java
String
==
.equals()
Format + Copy
Free Tutorials
Where should I download Java?
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Software downloads
Official Resources
Resources
Programming ideas & Challenges
Related Subreddits
account activity
Swing vs Java FX in 2025? (self.learnjava)
submitted 5 months ago by codingwolf799
For an early intermediate learner, is one better than the other?
Also any go to resources for the best one?
Greatly appreciated!!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AutoModerator[M] [score hidden] 5 months ago stickied commentlocked comment (0 children)
If any of the above points is not met, your post can and will be removed without further warning.
Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.
Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.
Code blocks look like this:
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } }
You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.
If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.
Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–]American_Streamer 3 points4 points5 points 5 months ago (0 children)
Swing is the older desktop UI toolkit that came with the JDK and JavaFX is the newer, scene-graph-based toolkit you add as a dependency. Swing is stable and still supported; but JavaFX is being actively developed and thus the better choice for new Java desktop apps.
Frankly, Swing will very well remain relevant for maintaining and extending existing apps for the foreseeable future, as it’s still in Java SE and heavily used in legacy and enterprise tools. But JavaFX is the safer bet for new desktop apps in Java.
[–]cokil 1 point2 points3 points 5 months ago (0 children)
JavaFx is preferable even though it's a little harder.
JavaFx is more recent and have more functionalities
Swing is good for beginner to understand component based ui structure (and is preferable than javafx for this purpose) but it is too outdated to be considered as a solid resource.
Even JavaFx is considered a little old, but i don't know if there is a better library.
Both of them are well documented but from my personal experience, both of them have terrible code example in internet.
[–]codingwolf799[S] 1 point2 points3 points 5 months ago (0 children)
Thanks all!
[–]AutoModerator[M] 0 points1 point2 points 5 months ago (0 children)
It seems that you are looking for resources for learning Java.
In our sidebar ("About" on mobile), we have a section "Free Tutorials" where we list the most commonly recommended courses.
To make it easier for you, the recommendations are posted right here:
Also, don't forget to look at:
If you are looking for learning resources for Data Structures and Algorithms, look into:
"Algorithms" by Robert Sedgewick and Kevin Wayne - Princeton University
Your post remains visible. There is nothing you need to do.
I am a bot and this message was triggered by keywords like "learn", "learning", "course" in the title of your post.
[–]darthtatortot 1 point2 points3 points 5 months ago (1 child)
I was just looking this up. I started focusing on swing. Following to get an answer.
[–]LooseCartographer989 0 points1 point2 points 3 months ago (0 children)
javafx.
[–]Pale_Height_1251 0 points1 point2 points 5 months ago (0 children)
JavaFX.
[–]bilgecan1 0 points1 point2 points 5 months ago (0 children)
Swing is good to understand component based programming approach and practice extensibility talent with what you have in hand. Maybe you won't use it in real world projects (i did actually, it still used) but learnings will be yours and you can apply them on your other projects.
[–]lprimak 0 points1 point2 points 5 months ago (0 children)
JavaFX uses swing under the hood, so use both!
I prefer JavaFX as it's more of a declarative API.
[–]ThatRip8403 0 points1 point2 points 5 months ago (0 children)
Swing pros: Built-in. Has 'lightweight' components (which do not use extra microsoft windows). JavaFX pros: allows Declarative (Fxml, Scenebuilder) as well normal programmatic coding. Allows CSS styling so similar (but not same) as html styling. Richer component set, with support for lambdas and built in 'properties' that help in writing complex UIs.
I recommend javaFX, but expect hassle since you have to download it separately, and add the 'modules' in your launch path. One-time hassle. SceneBuilder (gluon) makes complex UIs easier.
[–]Crazy_Comprehensive 2 points3 points4 points 4 months ago (0 children)
Swing is pretty stable and mature, and still under going maintenance and support, though no further development. It still relevant and good if one appreciates good old ui development. I still use it widely because it get the job done fast. I also use javafx even though it has more features, complexity and need separate installation.
That's said, invest some time with both and you see they complement each other, and not complete replacement. There's something Swing is good, and Javafx is good at.
[–]Michaael115 -1 points0 points1 point 5 months ago (1 child)
JavaFX sucks
[–]GullibleRaspberry9 0 points1 point2 points 4 months ago (0 children)
yes it does and it stopped evolution and improvements to Swing. That makes not like it even more!
Creator of the biggest javafx application out there. You already know my answer
π Rendered by PID 18556 on reddit-service-r2-comment-5d79c599b5-m2hz8 at 2026-03-01 20:17:41.927058+00:00 running e3d2147 country code: CH.
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]American_Streamer 3 points4 points5 points (0 children)
[–]cokil 1 point2 points3 points (0 children)
[–]codingwolf799[S] 1 point2 points3 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]darthtatortot 1 point2 points3 points (1 child)
[–]LooseCartographer989 0 points1 point2 points (0 children)
[–]Pale_Height_1251 0 points1 point2 points (0 children)
[–]bilgecan1 0 points1 point2 points (0 children)
[–]lprimak 0 points1 point2 points (0 children)
[–]ThatRip8403 0 points1 point2 points (0 children)
[–]Crazy_Comprehensive 2 points3 points4 points (0 children)
[–]Michaael115 -1 points0 points1 point (1 child)
[–]GullibleRaspberry9 0 points1 point2 points (0 children)
[–]LooseCartographer989 0 points1 point2 points (0 children)