SlideShare a Scribd company logo
1
OpenJFX on Android and
Devices
Stephen Chin (@steveonjava)
Java Technology Ambassador
JavaOne Content Chair
2
JavaFX on Android
It is about time!
3
Open Source Effort
https://javafxports.org/
4
• Cross-platform Animation, Video, Charting
• Integrate Java, JavaScript, and HTML5 in the
same application
• New graphics stack takes advantage of hardware
acceleration for 2D and 3D applications
• Integrate in Swing applications using JFXPanel
and SwingNode
Immersive Application Experience
JavaFX 2 Platform
5
How to Get JavaFX
 Step 1: Download Java 8
6
How to Develop JavaFX
Use Your Favorite IDE
7
How to Deploy to Android Devices
1. Install the Android SDK / ADT
2. Download the JavaFX -Dalvik Runtime from:
http://javafxports.org/
3. Compile your JavaFX application for Android using
Gradle
As easy as 1… 2… 3
8
Architecture of JavaFX 2
Java Virtual Machine
Java2D Open GL D3D
Prism Glass
WinTk
Media
Engine
Web
Engine
JavaFX Public API
Quantum Toolkit
9
Vanishing Circles
10
Application Skeleton
public class VanishingCircles extends Application {
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Vanishing Circles");
Group root = new Group();
Scene scene = new Scene(root, 800, 600, Color.BLACK);
[create the circles…]
root.getChildren().addAll(circles);
primaryStage.setScene(scene);
primaryStage.show();
[begin the animation…]
}
}
11
Create the Circles
List<Circle> circles = new ArrayList<Circle>();
for (int i = 0; i < 50; i++) {
final Circle circle = new Circle(150);
circle.setCenterX(Math.random() * 800);
circle.setCenterY(Math.random() * 600);
circle.setFill(new Color(Math.random(), Math.random(),
Math.random(), .2));
circle.setEffect(new BoxBlur(10, 10, 3));
circle.setStroke(Color.WHITE);
[setup binding…]
[setup event listeners…]
circles.add(circle);
}
12
Setup Binding
circle.strokeWidthProperty().bind(Bindings
.when(circle.hoverProperty())
.then(4)
.otherwise(0)
);
13
Setup Event Listeners
circle.addEventHandler(MouseEvent.MOUSE_CLICKED,
new EventHandler<MouseEvent>() {
public void handle(MouseEvent t) {
KeyValue collapse = new KeyValue(circle.radiusProperty(), 0);
new Timeline(new KeyFrame(Duration.seconds(3),
collapse)).play();
}
});
14
Begin the Animation
Timeline moveCircles = new Timeline();
for (Circle circle : circles) {
KeyValue moveX = new KeyValue(circle.centerXProperty(),
Math.random() * 800);
KeyValue moveY = new KeyValue(circle.centerYProperty(),
Math.random() * 600);
moveCircles.getKeyFrames().add(new KeyFrame(Duration.seconds(40),
moveX, moveY));
}
moveCircles.play();
15
MemeQuest: End-to-end JavaFX
 Animations, Images, Binding, Controls on the Client
 DataFX (http://www.javafxdata.org) for communication with DaliCloud
back-end
 User Interface: We need to stop Johan from doing User Interfaces.
Who wants to help?
 Code + downloads at http://bitbucket.org/lodgon/memequestfx
Layout Basics
17
Built-in Layouts
 AnchorPane
 BorderPane
 VBox/HBox
 FlowPane
 StackPane
 TilePane
 GridPane
18
Built-in Layouts
 AnchorPane
 BorderPane
 VBox/HBox
 FlowPane
 StackPane
 TilePane
 GridPane
19
Built-in Layouts
 AnchorPane
 BorderPane
 VBox/HBox
 FlowPane
 StackPane
 TilePane
 GridPane
20
Built-in Layouts
 AnchorPane
 BorderPane
 VBox/HBox
 FlowPane
 StackPane
 TilePane
 GridPane
A B
D E
C
21
Built-in Layouts
 AnchorPane
 BorderPane
 VBox/HBox
 FlowPane
 StackPane
 TilePane
 GridPane
22
Built-in Layouts
 AnchorPane
 BorderPane
 VBox/HBox
 FlowPane
 StackPane
 TilePane
 GridPane
23
Built-in Layouts
 AnchorPane
 BorderPane
 VBox/HBox
 FlowPane
 StackPane
 TilePane
 GridPane
Controls
25
Button Control
 Simple Button Control
 Add and remove click event handler
 Support Cascading Style Sheets
26
TextField Control
 One line entry text field control
 Set OnAction event handler
 Can listen to individual key events
 Support Cascading Style Sheets
27
ListView Control
 Displays a list of items
 Reuses cells for performance
 Default cell renderer can display Strings
 For other object types
– Create custom CellFactory
28
TreeView Control
 Displays a tree view of items
 Can dynamically populate as tree is expanded
 Default cell renderer can display Strings
 For other object types
– Create custom CellFactory
29
ToolBar Demo
 Toolbar displays items horizontally or vertically
 Handles arbitrary number of items
 Can add any node to the toolbar, including custom nodes
 Automatic adds an overflow hint if cannot display all toolbar items
30
Progress Bars and Indicators
 Progress Bars can be laid out vertically and
horizontally
 Progress Indicator is a circular widget
 Progress Bar and Indicator can be indefinite
 Double property 0.0 <= x <= 1.0
31
Accordion Control
 Accordion is a space saving components
 Accordian accept only TitledPanes
 Each TitledPane managed one
scenegraph node
 Can choose the titled pane expanded by
default
32
TabPane Control
 Alternative space saving component
 Choose a side for the Tab
 Each manages one component node
 Tab pane has two modes:
– floating
– recessed
33
DatePicker
 Allows selection of dates
and ranges
 Can use custom formats
and calendars
 Supports Cascading Style
Sheets
34
TreeTableView
 Combines a TreeView and a
TableView
 Optional menu for hiding and
showing columns
 Root can be hidden
 Supports multiple selection
 Supports CSS
35
New Modena UI Theme
36
Embedded Controls Theme
37
38
Build Applications Visually
JavaFX Scene Builder 2
39
RoboVM
JavaFX on iOS
+ =
40
41
Stephen Chin
tweet: @steveonjava
blog: http://steveonjava.com
nighthacking.com
Real Geeks
Live Hacking
NightHacking Tour
42
The preceding is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The development, release,
and timing of any features or functionality described for Oracle’s products
remains at the sole discretion of Oracle.

More Related Content

What's hot (19)

PPTX
SG Android Devs Meetup July 2013
Huijie Wu
 
PDF
Quickboot on i.MX6
Gary Bisson
 
ODP
Web QA Gaia/B2G/Firefox OS front-end automation
Stephen Donner
 
ODP
DanNotes XPages Mobile Controls
Paul Withers
 
PPTX
Building an iOS Build Server
Attila Tamás Zimler
 
PDF
Accessors Vs Direct access to properties & Design Pattern
CocoaHeads France
 
PPTX
Evolution of java By Abbas khan
Tatireddy Rajeevreddy
 
PPTX
LUGOD Raspberry Pi Hacking
Stephen Chin
 
PPT
Ctxaug 02 amd atlassian build pipeline
praecipio
 
PDF
Mobile Test Automation using one API and one infrastructure
Michael Palotas
 
PDF
Lua on Steroids - EclipseCon NA 2012
Benjamin Cabé
 
PDF
Continuous Integration with Hackintosh
David Ventura, M.E.T.
 
PPTX
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
Jesse Gallagher
 
PDF
Primefaces users guide_3_3
nesrine attia
 
PPTX
Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland
Artem Marchenko
 
PDF
Timings of Init : Android Ramdisks for the Practical Hacker
Stacy Devino
 
PDF
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
CocoaHeads France
 
PPTX
Java hot spot
Sagar Janagonda
 
SG Android Devs Meetup July 2013
Huijie Wu
 
Quickboot on i.MX6
Gary Bisson
 
Web QA Gaia/B2G/Firefox OS front-end automation
Stephen Donner
 
DanNotes XPages Mobile Controls
Paul Withers
 
Building an iOS Build Server
Attila Tamás Zimler
 
Accessors Vs Direct access to properties & Design Pattern
CocoaHeads France
 
Evolution of java By Abbas khan
Tatireddy Rajeevreddy
 
LUGOD Raspberry Pi Hacking
Stephen Chin
 
Ctxaug 02 amd atlassian build pipeline
praecipio
 
Mobile Test Automation using one API and one infrastructure
Michael Palotas
 
Lua on Steroids - EclipseCon NA 2012
Benjamin Cabé
 
Continuous Integration with Hackintosh
David Ventura, M.E.T.
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
Jesse Gallagher
 
Primefaces users guide_3_3
nesrine attia
 
Getting started with coding for Jolla Sailfish OS. 29 Mar 2014, Tampere, Finland
Artem Marchenko
 
Timings of Init : Android Ramdisks for the Practical Hacker
Stacy Devino
 
BlaBlaCar et la mise en place d'une fonctionnalité FlagFeature
CocoaHeads France
 
Java hot spot
Sagar Janagonda
 

Viewers also liked (20)

PPTX
Neo4J and Grails
Dmitry Buzdin
 
PPTX
JavaFx
Rohan Bhanderi
 
PDF
Getting your Grails on
Tom Henricksen
 
PDF
Introduction into JavaFX
Eugene Bogaart
 
PPT
Play framework
sambaochung
 
PPTX
JCrete Embedded Java Workshop
Stephen Chin
 
PPTX
Raspberry Pi with Java (JJUG)
Stephen Chin
 
PPTX
JavaFX and Scala in the Cloud
Stephen Chin
 
PPTX
Internet of Things Magic Show
Stephen Chin
 
PDF
DukeScript
Stephen Chin
 
PPTX
Confessions of a Former Agile Methodologist
Stephen Chin
 
PPTX
Java on Raspberry Pi Lab
Stephen Chin
 
PDF
Mary Had a Little λ (QCon)
Stephen Chin
 
PPTX
Raspberry Pi à la GroovyFX
Stephen Chin
 
PPTX
Hacking JavaFX with Groovy, Clojure, Scala, and Visage
Stephen Chin
 
PPTX
Zombie Time - JSR 310 for the Undead
Stephen Chin
 
PPTX
Raspberry pi gaming 4 kids
Stephen Chin
 
PDF
Raspberry Pi Gaming 4 Kids - Dutch Version
Stephen Chin
 
PDF
Effective JavaFX architecture with FxObjects
Srikanth Shenoy
 
PPTX
RetroPi Handheld Raspberry Pi Gaming Console
Stephen Chin
 
Neo4J and Grails
Dmitry Buzdin
 
Getting your Grails on
Tom Henricksen
 
Introduction into JavaFX
Eugene Bogaart
 
Play framework
sambaochung
 
JCrete Embedded Java Workshop
Stephen Chin
 
Raspberry Pi with Java (JJUG)
Stephen Chin
 
JavaFX and Scala in the Cloud
Stephen Chin
 
Internet of Things Magic Show
Stephen Chin
 
DukeScript
Stephen Chin
 
Confessions of a Former Agile Methodologist
Stephen Chin
 
Java on Raspberry Pi Lab
Stephen Chin
 
Mary Had a Little λ (QCon)
Stephen Chin
 
Raspberry Pi à la GroovyFX
Stephen Chin
 
Hacking JavaFX with Groovy, Clojure, Scala, and Visage
Stephen Chin
 
Zombie Time - JSR 310 for the Undead
Stephen Chin
 
Raspberry pi gaming 4 kids
Stephen Chin
 
Raspberry Pi Gaming 4 Kids - Dutch Version
Stephen Chin
 
Effective JavaFX architecture with FxObjects
Srikanth Shenoy
 
RetroPi Handheld Raspberry Pi Gaming Console
Stephen Chin
 
Ad

Similar to OpenJFX on Android and Devices (20)

PDF
The Brainify App - JavaFx
Mohd Shamweel
 
PPTX
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
JAX London
 
PPT
JavaFX - Next Generation Java UI
Yoav Aharoni
 
PPTX
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
Stephen Chin
 
PPTX
JavaFX and WidgetFX at SVCodeCamp
Stephen Chin
 
PDF
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
jaxconf
 
PDF
JavaFX 101
Richard Bair
 
PDF
JavaOne - The JavaFX Community and Ecosystem
Alexander Casall
 
PDF
JavaFX for Java Developers
Sten Anderson
 
PDF
Java Fx Ajaxworld Rags V1
rajivmordani
 
PPT
What is java fx?
kanchanmahajan23
 
PDF
JavaFX 2 Rich Desktop Platform
Rajmahendra Hegde
 
ODP
Java Fx Overview Tech Tour
Carol McDonald
 
PPTX
JavaFX 8 everywhere; write once run anywhere by Mohamed Taman
JavaDayUA
 
PPTX
Introduction to JavaFX
Houari ZEGAI
 
PDF
Javafx tutorial
sloumaallagui1
 
PDF
Javafx tutorial
HarikaReddy115
 
PDF
Javafx tutorial
Shaman Gupta
 
PDF
Demo on JavaFX
Knoldus Inc.
 
PDF
Domain Driven Design
Knoldus Inc.
 
The Brainify App - JavaFx
Mohd Shamweel
 
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
JAX London
 
JavaFX - Next Generation Java UI
Yoav Aharoni
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
Stephen Chin
 
JavaFX and WidgetFX at SVCodeCamp
Stephen Chin
 
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chin
jaxconf
 
JavaFX 101
Richard Bair
 
JavaOne - The JavaFX Community and Ecosystem
Alexander Casall
 
JavaFX for Java Developers
Sten Anderson
 
Java Fx Ajaxworld Rags V1
rajivmordani
 
What is java fx?
kanchanmahajan23
 
JavaFX 2 Rich Desktop Platform
Rajmahendra Hegde
 
Java Fx Overview Tech Tour
Carol McDonald
 
JavaFX 8 everywhere; write once run anywhere by Mohamed Taman
JavaDayUA
 
Introduction to JavaFX
Houari ZEGAI
 
Javafx tutorial
sloumaallagui1
 
Javafx tutorial
HarikaReddy115
 
Javafx tutorial
Shaman Gupta
 
Demo on JavaFX
Knoldus Inc.
 
Domain Driven Design
Knoldus Inc.
 
Ad

More from Stephen Chin (15)

PPTX
DevOps Tools for Java Developers v2
Stephen Chin
 
PPTX
10 Ways Everyone Can Support the Java Community
Stephen Chin
 
PPTX
Java Clients and JavaFX: The Definitive Guide
Stephen Chin
 
PPTX
DevOps Tools for Java Developers
Stephen Chin
 
PPTX
Java Clients and JavaFX - Presented to LJC
Stephen Chin
 
PPTX
JavaFX on Mobile (by Johan Vos)
Stephen Chin
 
PPTX
Confessions of a Former Agile Methodologist (JFrog Edition)
Stephen Chin
 
PPTX
Devoxx4Kids Lego Workshop
Stephen Chin
 
PPTX
Oracle IoT Kids Workshop
Stephen Chin
 
PDF
Java 8 for Tablets, Pis, and Legos
Stephen Chin
 
PPTX
Devoxx4Kids NAO Workshop
Stephen Chin
 
PPTX
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Stephen Chin
 
PPTX
Moving to the Client - JavaFX and HTML5
Stephen Chin
 
PPTX
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
Stephen Chin
 
PPTX
JavaFX 2 Using the Spring Framework
Stephen Chin
 
DevOps Tools for Java Developers v2
Stephen Chin
 
10 Ways Everyone Can Support the Java Community
Stephen Chin
 
Java Clients and JavaFX: The Definitive Guide
Stephen Chin
 
DevOps Tools for Java Developers
Stephen Chin
 
Java Clients and JavaFX - Presented to LJC
Stephen Chin
 
JavaFX on Mobile (by Johan Vos)
Stephen Chin
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Stephen Chin
 
Devoxx4Kids Lego Workshop
Stephen Chin
 
Oracle IoT Kids Workshop
Stephen Chin
 
Java 8 for Tablets, Pis, and Legos
Stephen Chin
 
Devoxx4Kids NAO Workshop
Stephen Chin
 
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Stephen Chin
 
Moving to the Client - JavaFX and HTML5
Stephen Chin
 
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
Stephen Chin
 
JavaFX 2 Using the Spring Framework
Stephen Chin
 

Recently uploaded (20)

PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Biography of Daniel Podor.pdf
Daniel Podor
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 

OpenJFX on Android and Devices