2. What is Java FX
JavaFX is a Java library used to build Rich
Internet Applications. The applications
written using this library can run consistently
across multiple platforms.
To develop GUI Applications using Java
programming language.
2Hussein zayed
3. 3
1- FXML
2-Scene Builder
3-CSS Like Stylee
4-Integrated Graphics library
5-Swing interoperability
6-Multitouch Support
Hussein zayed
Features of JavaFX
5. Stage (a window) contains all the
objects of a JavaFX application
scene represents the physical contents of a
JavaFX application
Node Anything added to the scene is said to
be Node.
8. 8
Node
Hussein zayed
Any component is node
1-One of the geometric shapes either 2D - 3D (Rectangle - Circle - Box - Sphere)
2-One of the control interface elements is like (Button - CheckBox - RadioButton)
3-It can be one of the types of containers that can enumerate several Nodes such as(
GridPane - StakPane)
4-It can be a component of Media (Audio - Image - Video)
9. 9
Lifecycle of JavaFX Application
When creating an application with JavaFX, the primary layer in this application must
be inherited from the Application class
Within the application you must do an Override of the start () function inherited from
the Application layer and place the code to create the main window in the application.
When you do these two steps, the Java Application Engine (JVM) will automatically
execute the Application class functions in the same order as in the image above .
Hussein zayed
12. 12
Label
Hussein zayed
public String getText()
public void setText(String text)
public final void setTextFill(Paint value)
public final void setBackground(Background value)
public final void setFont(Font newFont)
public final void setTranslateX(double value)
public final void setScaleY(double value)
public void setPrefSize(double prefWidth, double prefHeight)
14. 14
TextFiled
public String getText()
public void setText(String text)
public final void setTextFill(Paint value)
public final void setBackground(Background value)
public final void setFont(Font newFont)
public final void setTranslateX(double value)
public final void setScaleY(double value)
public void setPrefSize(double prefWidth, double prefHeight)