Swing, JavaFX and JSF are three very different presentation layers.
Swing is a desktop application presentation layer - the GUI for an application running on your computer.
JavaFX is a presentation layer somewhat akin to Flash. It is meant to be embedded in a web page. It is not a desktop application approach. It could be used instead of JApplets, for example, or possibly as an alternative to some applications delivered through Java Web Start.
In short - JSF and JavaFX are not replacements for Swing. You pick the technology for type of application you want to run. If you are considering Swing, then forget about JSF because there is zero overlap. If you are considering Applets then think about JavaFX. If you are thinking desktop, use Swing.
If you are looking to learn one and not the others... then your mind is in the wrong place. Learn one (probably Swing first if you are a new user), then another (probably JavaFX because it will be the easiest transition), and the web applications (Servlets, JSPs, JSF, and EJBs).
I agree with Steve here. From my understanding, JavaFX is one technology that can run on both desktop (like through web start) and embed within web pages (like applets). Yet the functionalities for each technology is something you want to look at depending on exactly what user behavior you want.
6. Is JavaFX replacing Swing as the new client UI library for Java SE?
Yes. However, Swing will remain part of the Java SE specification for the foreseeable future, and therefore included in the JRE. While we recommend developers to leverage JavaFX APIs as much as possible when building new applications, it is possible to extend a Swing application with JavaFX, allowing for a smoother transition.
However, as pointed out above, Oracle recommends development of desktop applications using JavaFX 2.x rather than Swing. It's a different matter that JavaFX can be packaged to run in a web application (like Flash/Applet).
Basically, the idea is to have the same codebase which can run in different devices (Desktop, Browser and maybe mobile devices tomorrow).
Having said that, JavaFX is not yet tightly integrated with Java. Suppose, you develop a Swing application and distribute it, users just need the JRE for the app to run. However, in case of a JavaFX application, users need to install an extra JavaFX plugin for the application to run - note that this is true even for desktop applications.
Last heard, Oracle is planning tight integration of JavaFX with Java from version 8 onwards (so, if user has JRE 8, that would be good enough). So, at a practical level, it will take some more time for people to start using JavaFX for production-ready applications (plus the Mac/Linux versions for JavaFX were also released only recently). So, from a skills perspective, for desktop, Swing will still be used in real projects.
In the meantime, to ease the transition, both JavaFX and Swing support inter-interoperability - for example, Swing provides a JFXPanel with which you can embed JavaFX stuff within a Swing application.
So, I think it would be better to start with Swing and learn the basics - layouts, event handling will be similar in Swing and JavaFX. Nevertheless, if you are only looking at learning to code a desktop application (and not from a sole job perspective), you can start learning JavaFX 2.x.
Ranganathan Kaliyur Mannar wrote:JavaFX is not yet tightly integrated with Java. Suppose, you develop a Swing application and distribute it, users just need the JRE for the app to run. However, in case of a JavaFX application, users need to install an extra JavaFX plugin for the application to run - note that this is true even for desktop applications.
Last heard, Oracle is planning tight integration of JavaFX with Java from version 8 onwards
Java SE 7 Update 6 provides the merging of JavaFX into the Oracle Java SE installation. JavaFX was a stand-alone product, and is now fully integrated in this release. On Windows, JavaFX and Java Access Bridge are now installed as part of the JRE or JDK. This provides convenience for end users and system administrators, who don't need to install and maintain JavaFX separately. Application developers can also be assured that from now on, JavaFX runtime libraries will be present on millions of desktops by default.
Steve Luke wrote:It is not a desktop application approach.
I agree with everything you said except for this. You can use it for desktop, the web, and soon mobile. Scene Builder is already set up with Zoom, Swipe, and Touch, and they say it will work with sensor detection as well in the future. At the last JavaOne they showed Fx on Mobile.
As to the OP I believe like Steve said, you should do Swing first, and get your feet wet, then goto FX. I have been using swing for a few years and now I am switching everything to FX. FX has so many more capabilities and I cannot wait until it's integrated more with Netbeans and the JDK itself. Check out the road map.