Transcript for:
Beginner's Guide to Java FX Basics

hello guys welcome to the first video on Java FX tutorial for beginners in this video we will see what is Java F effect and how it's different from swing which is also a GUI platform for Java so first of all what is Java FS Java f is a media SLG Graphics framework for creating guis in Java applications where GUI stands for graphical user interface and Java FX is intended to replace swing as the standard GUI library for Java software environment now it's more powerful than swing and it can be used to create both desktop and web applications Java FX is like swing which draws its own components and which have lesser communication with OS and it's like lightweight and Hardware accelerated now it make use of a file called fxml which is a new XML based markup language for handling uis okay now let's see uh some history about Java FX first of all for the first time Java FX was announced in May 2007 by sun microsystem and it was released in December 20 08 it was originally brought as a response for flashh and shock wave but one of the intention was also to improve the ease of creating guies for Java application now the latest version of Java FX is Java FX 9 and why we use it so you can see this is a swing uh jframe or you can say swing window which looks like this and let's see how the Java XX window will look like when we create it so this is how the Java FX uh project window will look like whenever you use some widgets of Java FX in the window right so it's much more improved advanced than swing right so it can be the replacement of the Swing now I have one example I have created the hello world window for the swing application and the Java effects and you can see the difference so this is on my right is the swing jframe and here is the Java FX scene and you can see the difference between them the Java FX is more flexible and it looks more attractive and it has much more functionality than Java Swing okay now in addition Oracle provides you the Java FX scene Builder which is a visual user interface design tool and by using it you don't need to spend n number of uh hours anymore on trying to move a button little bit on the left or right or little bit adjusting its color right Java f has the ability to apply CSS on the component of the UI opens a door for better looking application that are more attractive to the end user it also has 3D support now before Java FX version 2 Java FX was made to use Java FX script so it was using Java FX script and using that it was was uh you know creating the scenes and stages and uh the windows right but it was uh until the version 2.0 which was deprecated after version 2.0 and from 2.0 onwards fxml has been introduced which is more powerful and XML based one advantage of it is all developers has the knowledge of XML so which is a benefit right now fxml is a declarative XML based language which is easy to use okay now you may ask which one is better Java F or swing so GUI which are created using Java effects a lot faster than swing or awt applications Java FX gives you more sophisticated and aesthetically pleasing UI is in Java FX it's really easy to integrate sounds images video or web content Java FX code is really simplified by separating the UI from the logic of the application and Java FX can be integrated in swing application allowing for the smoother transaction now Java FX terminology is little bit different from swing so the main window of Java FX on which every wiget or component resides on is called stage okay and on top of it there is a scene so there is a framework called scene and on scene you can add the widgets something like buttons labels or other widgets okay so this is the basic uh framework for Java FX window so you have the stage scenes and then your widgets so that's it for this video in the next video we will see how we can install and run our first application in Java FX so stay tuned and please wait comment and subscribe and bye for now