Unit-7 - JAVAFX basics & Event-driven Programming & Animations
Unit-7 - JAVAFX basics & Event-driven Programming & Animations
Unit-07
JavaFX and Event-
driven programming
and animations
Outline
Looping
What is JavaFX?
Architecture of JavaFX API
JavaFX Application Structure
Lifecycle of JavaFX Application
2D Shape
JavaFX - Colors
JavaFX – Image
Layout Panes
JavaFX – Events
Property Binding
Animation
What is JavaFX?
JavaFX is a Java library used to build Rich Internet Applications (RIA) and Desktop
Applications.
The applications developed using JavaFX can run on various devices such as Desktop
Computers, Mobile Phones, TVs, Tablets, etc.
To develop GUI Applications using Java programming language, the programmers rely on
libraries such as Advanced Windowing Toolkit (AWT) and Swing. After the advent of JavaFX,
these Java programmers can now develop GUI applications effectively with rich content.
Why we need JavaFX
To develop Client Side Applications with rich features, the programmers used to depend on various libraries
to add features such as Media, UI controls, Web, 2D and 3D, etc.
JavaFX provides a rich set of graphics and media API’s and it leverages the modern Graphical Processing
Unit through hardware accelerated graphics.
One can use JavaFX with JVM based technologies such as Java, Groovy and JRuby. If developers opt for
JavaFX, there is no need to learn additional technologies.
Quantum Toolkit
Stage
Scene
Scene Graph
Root
Node
Branch Leaf
Node Node
Leaf Leaf
Node Node
primaryStage.setScene(s);
primaryStage.show();