introduction to javafx cs12420 – software development andrei stanica (modified ltt)
TRANSCRIPT
![Page 1: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/1.jpg)
INTRODUCTION TO JAVAFX
CS12420 – Software DevelopmentAndrei Stanica(modified ltt)
![Page 2: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/2.jpg)
Overview
What is JavaFX History Why use it JavaFX or Swing/AWT Examples
![Page 3: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/3.jpg)
What is JavaFX
A media/graphics framework for creating GUIs in Java applications
Based on Swing and AWT More powerful Used to create both desktop and web
applications Like Swing draws its own components, less
communication with OS Lightweight and hardware-accelerated Makes use of FXML – new XML-based mark-
up language for defining UIs
![Page 4: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/4.jpg)
History
First announced in May 2007 by then Sun Microsystems
Released in December 2008 Originally brought as a response to Flash
and Shockwave But also to improve ease of creating
GUIs for Java applications Latest release is JavaFX 2.2
![Page 5: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/5.jpg)
History
With the latest release Oracle added numerous features: Linux and Mac OSX support Multi-touch events and gestures Image manipulation easier with built-in API Bundled with Java SE 7 update 6 Big number of new and enhanced UI
controls, charts and containers Many more…
![Page 6: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/6.jpg)
Why use it
![Page 7: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/7.jpg)
Why use it
![Page 8: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/8.jpg)
Why use it
Oracle provides you with JavaFX Scene Builder Visual UI design tool No need to spend n-hours anymore on trying to
move a button a little bit to the left Ability to apply CSS on the components of
the UI opens a door for better looking applications that are more attractive to the end-user
Soon 3D support (possibility of games cropping up) and iOS and Android support promised by Oracle
![Page 9: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/9.jpg)
JavaFX Script and FXML
Before version 2.0, JavaFX made use of JavaFX Script
JavaFX Script – proprietary scripting language – deprecated
![Page 10: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/10.jpg)
JavaFX Script and FXML
From 2.0 onwards, FXML has been introduced More powerful and XML-based All developers have knowledge of XML
FXML – declarative XML-based language
![Page 11: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/11.jpg)
JavaFX or Swing/AWT
Less
IDEs provide support for GUIs in Swing but in FX this is provided by Scene Builder which is part of distribution
![Page 12: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/12.jpg)
JavaFX or Swing/AWT
More
This is Scene Builder running
![Page 13: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/13.jpg)
JavaFX or Swing/AWT
GUIs are created a lot faster than in Swing and AWT
More sophisticated and aesthetically pleasing UIs
Easy integration of sounds, images and videos and of web content
Code is simplified in JavaFX by separating the UI from the logic of the application
JavaFX can be integrated in Swing applications, allowing for a smoother transition
![Page 14: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/14.jpg)
Examples
Demonstration of JavaFX (use chrome) http://www.oracle.com/technetwork/java/
javafx/samples/index.html
Java SE 7, JavaFX, JavaFX Scene Builder and examples to get you started can be found here: http://www.oracle.com/technetwork/java/
javafx/downloads/index.html
![Page 15: INTRODUCTION TO JAVAFX CS12420 – Software Development Andrei Stanica (modified ltt)](https://reader035.vdocuments.net/reader035/viewer/2022062312/551b33a5550346cf5a8b6245/html5/thumbnails/15.jpg)
Other Useful Links
http://docs.oracle.com/javafx/2/overview/jfxpub-overview.htm description
http://docs.oracle.com/javafx/2/api/index.html API