Java GUI has gone through multiple schemes for designing client based GUI applications. AWT came out with JDK version 1.0 and then Swing was introduced with version 1.2 . Later versions provide support for previous GUI schemes. So Java 1.8 will also run AWT programs thus providing backward compatibility. JavaFX was introduced with JDK 1.6 .
AWT relies on the native operating system GUI controls . Say we have a window that has a menu and a single button and runs on the Window operating system. The button that is created is the Windows native button. The controls look the same as other Window controls. If we developed the same application on say the Mac then we will see the Mac button. This had the advantage that the GUI application had a native feel to it but the number of controls was limited also as one control that may exist on one system may not exist on another system. Also a control may not have the functionality in one operating system as another. Swing was designed in a different manner . The outer window is of course still a native window but the controls like button are drawn by Swing itself. This leads to a more consistent interface across operating systems and also allows for more controls .
Java FX offers additional features such as designing an interface using a traditional HTML approach.
JDK 11 does not come built in with the FX component. To compile a Java program using FX we can use the following command on the Hills server.
export PATH_TO_FX="/usr/java11/javafx-sdk-11.0.2/lib"
javac --module-path $PATH_TO_FX --add-modules=javafx.controls HelloFX.java
java --module-path $PATH_TO_FX --add-modules=javafx.controls HelloFX