SlideShare una empresa de Scribd logo
1 de 21
JavaFX
-Rohit Vaidya
JUG Hyderabad
JavaFX
 JavaFX is a software platform for creating Rich
Internet Applications that can run across variety
of platforms[1]
 Collection of Java Packages with ability to add
fancy GUI’s to your Java application
 Groovy and Scala can also be used to write
JavaFX. JVM Languages indeed!!!
 JavaFX is official standard part of Java platform
JavaFX - History
 Formerly called F3 (Form Follows Function) and
developed by Chris Oliver at Sun Microsystems
 JavaFX was initially developed as a scripting
language however it was discontinued by Oracle
and declared dead in JavaOne (2010)[2]
JavaFX Stack
Possibilities
 CSS support
 Visual effects – shadow, reflection, blur,
perspective
 Animation – cubes, cylinders, spheres etc
 Charts
 3D objects
 Touch interface
 Property bindings
Possibilities
JavaFX - Lingo
 Stage – Top level container for all JavaFX objects
 Scene – A scene is a hierarchical node structures
that contains all scene’s components
 Group – Group is a general purpose container
node
JavaFX - Lingo
JavaFx Lingo
JavaFX Important Packages
 javafx.application: Core package on which all
JavaFX application depend
 javafx.stage: Most important class here is the Stage
class
 javafx.scene: Most important class here is the scene
class which is the container that holds all UI
elements
 javafx.scene.layout: Contains Layout Manager. Job
of Layout manager is to determine position of each
control displayed
 Javafx.scene.control: Individual controls like
buttons, text boxes and labels exist here
JavaFX LifeCycle
 Application class is responsible for managing the
lifecycle of JavaFX application
 Lifecycle steps
 Create an instance of Application
 Call init method
 Call start method
 Wait for application to End
 Call the stop method
JavaFX Lifecycle
 init (): Default implementation of init does nothing.
 One can override to perform any processing before
application UI is displayed
 start (): No default implementation and is declared
abstract.
 Your app must override this. Build and display the UI
 Wait for application to End. Typically happens when
user signals end of program
 stop(): Default implementation does not do
anything
 One can override to to perform any necessary
processing as program terminates.
JavaFX Launching
Application
 Standard entry point to Java program is the
main method
 The launch method is in Application class
JavaFX - Layouts
 Hbox – Provides a horizontal layout of its contents
in a single row
 Vbox – Provides a vertical layout of its content in
a single column
 Flow – Provides a layout of content in either
horizontal or vertical flow wrapping at current
height or boundary
 Tile – Same as flow. But all cells are uniform size.
Controlled via tileHeight and tileWidth
JavaFX - Layouts
GitFX – Project
GitFX Project
GitFX Project
JavaFX Deployments
1. Launch from command line using java launcher
2. Launch as a desktop application from a JAR or
self contained application
3. View in a web page
4. Launch by clicking a link in the browser to
download an application
References
 1 http://en.wikipedia.org/wiki/JavaFX
 2 http://java.dzone.com/articles/oracle-
discontinue-javafx
 3 JavaFX for Dummies
 4 Effective JavaFX
 Deployments:
http://docs.oracle.com/javafx/2/get_started/bas
ic_deployment.htm#BABFAFEC

Más contenido relacionado

La actualidad más candente

108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
Anil Kumar
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
sshhzap
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overview
Jong Soon Bok
 
Project Presentation on Advance Java
Project Presentation on Advance JavaProject Presentation on Advance Java
Project Presentation on Advance Java
Vikas Goyal
 

La actualidad más candente (20)

Groovy features
Groovy featuresGroovy features
Groovy features
 
Mpl 1
Mpl 1Mpl 1
Mpl 1
 
Struts & hibernate ppt
Struts & hibernate pptStruts & hibernate ppt
Struts & hibernate ppt
 
J2EE Struts with Hibernate Framework
J2EE Struts with Hibernate FrameworkJ2EE Struts with Hibernate Framework
J2EE Struts with Hibernate Framework
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Lecture java basics
Lecture   java basicsLecture   java basics
Lecture java basics
 
Java introduction
Java introductionJava introduction
Java introduction
 
Introduction to java technology
Introduction to java technologyIntroduction to java technology
Introduction to java technology
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
 
Java Modularity: the Year After
Java Modularity: the Year AfterJava Modularity: the Year After
Java Modularity: the Year After
 
Ad103 - Have it Your Way: Extending IBM Lotus Domino Designer
Ad103 - Have it Your Way: Extending IBM Lotus Domino DesignerAd103 - Have it Your Way: Extending IBM Lotus Domino Designer
Ad103 - Have it Your Way: Extending IBM Lotus Domino Designer
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginners
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Features of java
Features of javaFeatures of java
Features of java
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overview
 
java tutorial for beginner - Free Download
java tutorial for beginner - Free Downloadjava tutorial for beginner - Free Download
java tutorial for beginner - Free Download
 
MV(C, mvvm) in iOS and ReactiveCocoa
MV(C, mvvm) in iOS and ReactiveCocoaMV(C, mvvm) in iOS and ReactiveCocoa
MV(C, mvvm) in iOS and ReactiveCocoa
 
Project Presentation on Advance Java
Project Presentation on Advance JavaProject Presentation on Advance Java
Project Presentation on Advance Java
 

Destacado

Destacado (8)

Gauva
GauvaGauva
Gauva
 
How i taught a computer to play chess
How i taught a computer to play chessHow i taught a computer to play chess
How i taught a computer to play chess
 
JavaFX Layout Secrets with Amy Fowler
JavaFX Layout Secrets with Amy FowlerJavaFX Layout Secrets with Amy Fowler
JavaFX Layout Secrets with Amy Fowler
 
Effective java - Creating and Destroying Objects
Effective java  - Creating and Destroying ObjectsEffective java  - Creating and Destroying Objects
Effective java - Creating and Destroying Objects
 
8 True Stories about JavaFX
8 True Stories about JavaFX8 True Stories about JavaFX
8 True Stories about JavaFX
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
 

Similar a Java fx

Similar a Java fx (20)

Advance java prasentation
Advance java prasentationAdvance java prasentation
Advance java prasentation
 
JavaFX: A Rich Internet Application (RIA) Development Platform
JavaFX: A Rich Internet Application (RIA) Development PlatformJavaFX: A Rich Internet Application (RIA) Development Platform
JavaFX: A Rich Internet Application (RIA) Development Platform
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
Introduction to JavaFX
Introduction to JavaFXIntroduction to JavaFX
Introduction to JavaFX
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
Hinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile DojoHinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile Dojo
 
Java Technology Define In Short Time
Java Technology Define In  Short TimeJava Technology Define In  Short Time
Java Technology Define In Short Time
 
DesktopApps.pptx
DesktopApps.pptxDesktopApps.pptx
DesktopApps.pptx
 
Beyond The Buzz: Pluggable JavaFX Corporate Applications
Beyond The Buzz: Pluggable JavaFX Corporate ApplicationsBeyond The Buzz: Pluggable JavaFX Corporate Applications
Beyond The Buzz: Pluggable JavaFX Corporate Applications
 
Java fx
Java fxJava fx
Java fx
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
 
Ch2
Ch2Ch2
Ch2
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
 
java basics.pptx
java basics.pptxjava basics.pptx
java basics.pptx
 
01. Introduction to programming with java
01. Introduction to programming with java01. Introduction to programming with java
01. Introduction to programming with java
 
Eclipse - Single Source;Three Runtimes
Eclipse - Single Source;Three RuntimesEclipse - Single Source;Three Runtimes
Eclipse - Single Source;Three Runtimes
 
Java - At a glance
Java - At a glanceJava - At a glance
Java - At a glance
 
JavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemJavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and Ecosystem
 
Java1
Java1Java1
Java1
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Java fx

  • 2. JavaFX  JavaFX is a software platform for creating Rich Internet Applications that can run across variety of platforms[1]  Collection of Java Packages with ability to add fancy GUI’s to your Java application  Groovy and Scala can also be used to write JavaFX. JVM Languages indeed!!!  JavaFX is official standard part of Java platform
  • 3. JavaFX - History  Formerly called F3 (Form Follows Function) and developed by Chris Oliver at Sun Microsystems  JavaFX was initially developed as a scripting language however it was discontinued by Oracle and declared dead in JavaOne (2010)[2]
  • 5. Possibilities  CSS support  Visual effects – shadow, reflection, blur, perspective  Animation – cubes, cylinders, spheres etc  Charts  3D objects  Touch interface  Property bindings
  • 7. JavaFX - Lingo  Stage – Top level container for all JavaFX objects  Scene – A scene is a hierarchical node structures that contains all scene’s components  Group – Group is a general purpose container node
  • 10. JavaFX Important Packages  javafx.application: Core package on which all JavaFX application depend  javafx.stage: Most important class here is the Stage class  javafx.scene: Most important class here is the scene class which is the container that holds all UI elements  javafx.scene.layout: Contains Layout Manager. Job of Layout manager is to determine position of each control displayed  Javafx.scene.control: Individual controls like buttons, text boxes and labels exist here
  • 11. JavaFX LifeCycle  Application class is responsible for managing the lifecycle of JavaFX application  Lifecycle steps  Create an instance of Application  Call init method  Call start method  Wait for application to End  Call the stop method
  • 12. JavaFX Lifecycle  init (): Default implementation of init does nothing.  One can override to perform any processing before application UI is displayed  start (): No default implementation and is declared abstract.  Your app must override this. Build and display the UI  Wait for application to End. Typically happens when user signals end of program  stop(): Default implementation does not do anything  One can override to to perform any necessary processing as program terminates.
  • 13. JavaFX Launching Application  Standard entry point to Java program is the main method  The launch method is in Application class
  • 14.
  • 15. JavaFX - Layouts  Hbox – Provides a horizontal layout of its contents in a single row  Vbox – Provides a vertical layout of its content in a single column  Flow – Provides a layout of content in either horizontal or vertical flow wrapping at current height or boundary  Tile – Same as flow. But all cells are uniform size. Controlled via tileHeight and tileWidth
  • 20. JavaFX Deployments 1. Launch from command line using java launcher 2. Launch as a desktop application from a JAR or self contained application 3. View in a web page 4. Launch by clicking a link in the browser to download an application
  • 21. References  1 http://en.wikipedia.org/wiki/JavaFX  2 http://java.dzone.com/articles/oracle- discontinue-javafx  3 JavaFX for Dummies  4 Effective JavaFX  Deployments: http://docs.oracle.com/javafx/2/get_started/bas ic_deployment.htm#BABFAFEC