Javafx seemed a good idea at first, she brought several news like:
- GUI more sophisticated;
- UI developed in FXML (which is based on XML);
- Easier to use MVC;
- CSS support, and etc.
While Swing is older and more robust, and although many think that Javafx came to replace Swing the trend shows that the two will continue to exist in parallel, because despite the novelties I do not usually see much being developed in Javafx, and its support remains much smaller than that of Swing.
The learning curve of both platforms are not the simplest, there are several tricks you will learn as you develop and this can result in a significant delay for your projects while you do not master the tools.
I would say that you should migrate from Swing to Javafx only if you really need more modern UI, with animation and things like that, or if you want to venture academically. Take care if you want to do professional projects on an unknown platform, you will probably run into difficulties that will not be possible to predict before starting the project and may have delays beyond your expected.
If you don’t have intimacy with either of the two tools I would say start with Swing, because there’s a lot more code in Swing in production than Javafx, then the chances of one day you bump into a work in progress of someone who was done with Swing is much higher than in Javafx.
Actually Java for Desktop is something that did not work very well, very few companies use this solution and consequently if you are investing to enter the labor market do not focus on any of these technologies, get deeper into the Web part. The Web part however requires you to know much more than just Java, you will constantly have contact with other technologies and should master a much larger range of them, you do not need to be an expert (if it is, better), but you will need to know Javascript, HTML and several Java-based Web frameworks. But believe me, you’ll have a lot more open doors than you want to insist on Java Desktop.
TL;DR
Opt for Javafx only if you really have the need for modern Desktop UI, or if you’re being curious about an undated project to finish. If you need to develop something Desktop with Java that doesn’t need fancy UI, go/continue to Swing.
If you’re looking to delve into Java looking to enter the job market but without a fixed target, forget both and go from Java EE.
I understand, I have come to the conclusion that I will only study Javafx and continue using Swing for applications, since it makes no difference the modern UI. And I will delve into Java EE too. Thank you
– DiegoAugusto
@Diegoaugusto increased the response a little and added the part that talks about Java EE. I had stopped for lunch, so it took a while :) Maybe I’ll add some information later, but then I’ll let you know.
– Math
Why not study Java for android?
– user24857
@user24857 he did not ask that :) Moreover I would say that I don’t quite know the subject to give my opinion, but I know that today there are many cross-Platform options that can do better than Java. I honestly cannot speak with certainty on this subject, otherwise I would even add in my answer without problems.
– Math
Yes, Google thinks of using Dart for android.
– user24857
It seems to me a little based on opinion are not @Math?
– Jorge B.
@Jorgeb. I think it’s a valid question. If you prefer to hear other opinions it takes pro meta or pro chat
– Math