javafx 1 - research school of computer science · introduction to software systems...
TRANSCRIPT
![Page 1: JavaFX 1 - Research School of Computer Science · Introduction to Software Systems 1110/1140/1510/6710 JavaFX JavaFX ... Java API – For older JDKs, JavaFX is separately bundled,](https://reader030.vdocuments.net/reader030/viewer/2022020412/5afd51397f8b9a944d8d4813/html5/thumbnails/1.jpg)
Introduction to Software Systems 1110/1140/1510/6710
Intro to JavaFX
JavaFX 1 X1
![Page 2: JavaFX 1 - Research School of Computer Science · Introduction to Software Systems 1110/1140/1510/6710 JavaFX JavaFX ... Java API – For older JDKs, JavaFX is separately bundled,](https://reader030.vdocuments.net/reader030/viewer/2022020412/5afd51397f8b9a944d8d4813/html5/thumbnails/2.jpg)
Introduction to Software Systems 1110/1140/1510/6710
JavaFX
JavaFX
• Designed for rich client applications – Graphics, UI’s, video, audio, etc.
• Java APIs, integrated with Java 8 – Not to be confused with JavaFX 1.x, which is a scripting language, not a
Java API – For older JDKs, JavaFX is separately bundled, and must be separately
installed
• Replaces Swing • JavaFX HelloWorld
5
X1
![Page 3: JavaFX 1 - Research School of Computer Science · Introduction to Software Systems 1110/1140/1510/6710 JavaFX JavaFX ... Java API – For older JDKs, JavaFX is separately bundled,](https://reader030.vdocuments.net/reader030/viewer/2022020412/5afd51397f8b9a944d8d4813/html5/thumbnails/3.jpg)
Introduction to Software Systems 1110/1140/1510/6710
JavaFX
JavaFX
• Extend javafx.application.Application – Override the start() method
• Stage– Think of it as a window
• Scene– Container for a scene graph
• StackPane– Organizer of nodes in scene graph – Others include FlowPane, TilePane, GridPane, etc
6
X1
![Page 4: JavaFX 1 - Research School of Computer Science · Introduction to Software Systems 1110/1140/1510/6710 JavaFX JavaFX ... Java API – For older JDKs, JavaFX is separately bundled,](https://reader030.vdocuments.net/reader030/viewer/2022020412/5afd51397f8b9a944d8d4813/html5/thumbnails/4.jpg)
Introduction to Software Systems 1110/1140/1510/6710
JavaFX
Java FX Scene Graph Tree of nodes, with a single ‘branch’ at the root • branch (may have children, eg Group, Region) • leaf (may not have children, eg Rectangle, Circle)
7
Copyright Oracle (http://docs.oracle.com/javafx/2/scenegraph/jfxpub-scenegraph.htm)
X1