Java FX
Introduction FX
and layouts
Java FX
FX is the new GUI library (and more) for Java
RIA or Rich Internet Application
−
flexible programs to be run inside a browser
or as a stand-alone application
−
animation of text and GUI widgets
−
2D and 3D views
−
embed video or audio media
−
hardware accelerated
−
includes many types of charts for showing data
Java FX Information
These slides will just be a quick overview to help you get
started. You will also need to get more details from the
following web pages (where I took many of my examples)
Java FX Documentation Homepage
http://docs.oracle.com/javafx/
Java FX Ensemble many, many examples with
code (8mb can also be downloaded)
http://download.oracle.com/otndocs/products/javafx/2.0.2/samples/Ensemble/index.html
Java FX API (this can also be downloaded to your
computer to run faster or without the internet)
http://docs.oracle.com/javafx/2/api/index.html
Eclipse Setup Note
if you are using Eclipse, you will need to add the FX run-time jar to
your project so that it can use FX classes
−
Select Properties for your Project
−
Then under Java Build Path, click Add External JARs... button
to add the jfxrt.jar to your project.
Quick Programming Note
When you are importing classes to use in your program, make
sure you are importing the FX classes, unless you really
wanted the older ones.
There are classes in the FX library with the same name as
classes in the other Java libraries, so be careful that you are
getting the correct class.