Netbeans JSR-296, Swing and JavaFX, what are we now meant to use?
I am starting to learn Java development (I used to develop in C++), I am using some older materials, however, I would also like to keep up to date with Java developments and recommendations.
I did some background resear开发者_Go百科ch regarding Swing and JavaFX. I learnt that development on JavaFX script has stopped, however, version 2 of FX is in development so I am not sure what this will end up being as I thought the scripting as a major part of the standard.
When using Netbeans I discovered that further development on Swing is to stop and too is Netbeans support (JSR-296). Netbeans recommends moving to the Netbeans Platform API which I am reluctant to do because I want to learn Java as a true cross platform language and not be tied to any particulars.
This begs me to ask the question what is the preferred new approach to deveping GUIs in the Java world?
You will probably find the Wikipedia page about JSR-296 informative.
Swing is an API that lets you work with various graphical 'controls'. You can arrange them is any number of ways to create a GUI for your application.
The Swing Application Framework (JSR-296) was and effort to create an API that would create a 'standard' way of writing applications, that would use Swing to present the UI.
The NetBeans Platform is a different effort with similar goals to JSR-296... though it does encompass some other areas, like modularity. The NetBeans IDE is built on the NetBeans Platform. The NetBeans Platform uses the Swing API to present UI.
SWT is an API at a similar level of abstraction as Swing.
The Eclipse Rich Client Platform (Eclipse RCP) is another application framework. The RCP is based on SWT. The Eclipse IDE is based on the Eclipse RCP.
You should know that:
You do not need to use the NetBeans IDE to create an application based on the NetBeans Platform.
You do not need to use the Eclipse IDE to create an application based on the Eclipse RCP.
Swing (Java) or SWT (Eclipse) - both are very much alive.
JavaFX should be considered a failed distraction of Sun's (now Oracle's).
精彩评论