SlideShare una empresa de Scribd logo
Java FX
What is Java FX
JavaFX is a Java library used to build Rich
Internet Applications. The applications
written using this library can run consistently
across multiple platforms.
To develop GUI Applications using Java
programming language.
2Hussein zayed
3
1- FXML
2-Scene Builder
3-CSS Like Stylee
4-Integrated Graphics library
5-Swing interoperability
6-Multitouch Support
Hussein zayed
Features of JavaFX
Hussein zayed
JavaFX
Form
Stage (a window) contains all the
objects of a JavaFX application
scene represents the physical contents of a
JavaFX application
Node Anything added to the scene is said to
be Node.
“
6
Imoprt javafx.stage.Stage // imoprt
show() // display stage Hussein zayed
Stage
Properties
setTitle(“”);
setWidth(x);
setHeight(x);
setMaxWidth(x);
setMinWidth();
setX(n);
setY(n);
setResizable(bool);
setOpacity(x);
setAlwaysOnTop(bool);
Scene
1-create group (container)
2-create scene
3-add group to scene
4-add node to group
5-add scene to stage
6-show stage 7
Hussein zayed
8
Node
Hussein zayed
Any component is node
1-One of the geometric shapes either 2D - 3D (Rectangle - Circle - Box - Sphere)
2-One of the control interface elements is like (Button - CheckBox - RadioButton)
3-It can be one of the types of containers that can enumerate several Nodes such as(
GridPane - StakPane)
4-It can be a component of Media (Audio - Image - Video)
9
Lifecycle of JavaFX Application
When creating an application with JavaFX, the primary layer in this application must
be inherited from the Application class
Within the application you must do an Override of the start () function inherited from
the Application layer and place the code to create the main window in the application.
When you do these two steps, the Java Application Engine (JVM) will automatically
execute the Application class functions in the same order as in the image above .
Hussein zayed
10
JavaFX - Architecture
11
Classes (component)
Label - JavaFX
Button - JavaFX
TextField - JavaFX
PasswordField - JavaFX
TextArea - JavaFX
ToogleButton - JavaFX
RadioButton - JavaFX
CheckBox - JavaFX
ChoiceBox - JavaFX
ComboBox - JavaFX
ListView - JavaFX
TableView - JavaFX
Hussein zayed
and many
12
Label
Hussein zayed
public String getText()
public void setText(String text)
public final void setTextFill(Paint value)
public final void setBackground(Background value)
public final void setFont(Font newFont)
public final void setTranslateX(double value)
public final void setScaleY(double value)
public void setPrefSize(double prefWidth, double prefHeight)
13
14
TextFiled
public String getText()
public void setText(String text)
public final void setTextFill(Paint value)
public final void setBackground(Background value)
public final void setFont(Font newFont)
public final void setTranslateX(double value)
public final void setScaleY(double value)
public void setPrefSize(double prefWidth, double prefHeight)
15
16
Task
Design login form include
label , TextFiled ,PasswordField , Button
17
Thanks!
FCI menoufia
Development Team at mufix community

Más contenido relacionado

La actualidad más candente

JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and Functions
Jussi Pohjolainen
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
Ravi_Kant_Sahu
 

La actualidad más candente (20)

Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Java presentation
Java presentation Java presentation
Java presentation
 
Core java
Core javaCore java
Core java
 
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVMJava Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
 
Spring boot
Spring bootSpring boot
Spring boot
 
Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for Designers
 
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and Functions
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Java database connectivity with MYSQL
Java database connectivity with MYSQLJava database connectivity with MYSQL
Java database connectivity with MYSQL
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
Java project
Java projectJava project
Java project
 

Similar a Java fx

UNIT 5-JavaFX Event Handling, Controls and Components.pdf
UNIT 5-JavaFX Event Handling, Controls and Components.pdfUNIT 5-JavaFX Event Handling, Controls and Components.pdf
UNIT 5-JavaFX Event Handling, Controls and Components.pdf
SakkaravarthiS1
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
rajivmordani
 
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docx
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docxWebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docx
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docx
melbruce90096
 
Clojure - A new Lisp
Clojure - A new LispClojure - A new Lisp
Clojure - A new Lisp
elliando dias
 

Similar a Java fx (20)

UNIT 5-JavaFX Event Handling, Controls and Components.pdf
UNIT 5-JavaFX Event Handling, Controls and Components.pdfUNIT 5-JavaFX Event Handling, Controls and Components.pdf
UNIT 5-JavaFX Event Handling, Controls and Components.pdf
 
From Swing to JavaFX
From Swing to JavaFXFrom Swing to JavaFX
From Swing to JavaFX
 
Java fx
Java fx Java fx
Java fx
 
JAX-WS Basics
JAX-WS BasicsJAX-WS Basics
JAX-WS Basics
 
JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)
 
Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)
 
Hinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile DojoHinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile Dojo
 
6 swt programming
6 swt programming6 swt programming
6 swt programming
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
 
React native
React nativeReact native
React native
 
Visage Android - Cleaner APIs, Cleaner UIs
Visage Android - Cleaner APIs, Cleaner UIsVisage Android - Cleaner APIs, Cleaner UIs
Visage Android - Cleaner APIs, Cleaner UIs
 
Node.js vs Play Framework
Node.js vs Play FrameworkNode.js vs Play Framework
Node.js vs Play Framework
 
JCConf2019: Next Step of JavaScript on Java
JCConf2019: Next Step of JavaScript on JavaJCConf2019: Next Step of JavaScript on Java
JCConf2019: Next Step of JavaScript on Java
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
Java FX 2.0 - A Developer's Guide
Java FX 2.0 - A Developer's GuideJava FX 2.0 - A Developer's Guide
Java FX 2.0 - A Developer's Guide
 
Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)
 
How to create interactive infographics
How to create interactive infographicsHow to create interactive infographics
How to create interactive infographics
 
JavaFX for Java Developers
JavaFX for Java DevelopersJavaFX for Java Developers
JavaFX for Java Developers
 
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docx
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docxWebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docx
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docx
 
Clojure - A new Lisp
Clojure - A new LispClojure - A new Lisp
Clojure - A new Lisp
 

Más de hussein zayed (6)

CS341 Algorithms Analysis and Design-Sec7.pptx
CS341 Algorithms Analysis and Design-Sec7.pptxCS341 Algorithms Analysis and Design-Sec7.pptx
CS341 Algorithms Analysis and Design-Sec7.pptx
 
Random Variables and Distributions
Random Variables and DistributionsRandom Variables and Distributions
Random Variables and Distributions
 
Product owner
Product ownerProduct owner
Product owner
 
substring & subSquence & find problem solving
substring & subSquence & find problem solving substring & subSquence & find problem solving
substring & subSquence & find problem solving
 
Inheritance & polymorphism java oop
Inheritance & polymorphism java oopInheritance & polymorphism java oop
Inheritance & polymorphism java oop
 
File Transport Protocol
File Transport ProtocolFile Transport Protocol
File Transport Protocol
 

Último

JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 

Último (20)

A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Benefits of Employee Monitoring Software
Benefits of  Employee Monitoring SoftwareBenefits of  Employee Monitoring Software
Benefits of Employee Monitoring Software
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 

Java fx

  • 2. What is Java FX JavaFX is a Java library used to build Rich Internet Applications. The applications written using this library can run consistently across multiple platforms. To develop GUI Applications using Java programming language. 2Hussein zayed
  • 3. 3 1- FXML 2-Scene Builder 3-CSS Like Stylee 4-Integrated Graphics library 5-Swing interoperability 6-Multitouch Support Hussein zayed Features of JavaFX
  • 5. Stage (a window) contains all the objects of a JavaFX application scene represents the physical contents of a JavaFX application Node Anything added to the scene is said to be Node.
  • 6. “ 6 Imoprt javafx.stage.Stage // imoprt show() // display stage Hussein zayed Stage Properties setTitle(“”); setWidth(x); setHeight(x); setMaxWidth(x); setMinWidth(); setX(n); setY(n); setResizable(bool); setOpacity(x); setAlwaysOnTop(bool);
  • 7. Scene 1-create group (container) 2-create scene 3-add group to scene 4-add node to group 5-add scene to stage 6-show stage 7 Hussein zayed
  • 8. 8 Node Hussein zayed Any component is node 1-One of the geometric shapes either 2D - 3D (Rectangle - Circle - Box - Sphere) 2-One of the control interface elements is like (Button - CheckBox - RadioButton) 3-It can be one of the types of containers that can enumerate several Nodes such as( GridPane - StakPane) 4-It can be a component of Media (Audio - Image - Video)
  • 9. 9 Lifecycle of JavaFX Application When creating an application with JavaFX, the primary layer in this application must be inherited from the Application class Within the application you must do an Override of the start () function inherited from the Application layer and place the code to create the main window in the application. When you do these two steps, the Java Application Engine (JVM) will automatically execute the Application class functions in the same order as in the image above . Hussein zayed
  • 11. 11 Classes (component) Label - JavaFX Button - JavaFX TextField - JavaFX PasswordField - JavaFX TextArea - JavaFX ToogleButton - JavaFX RadioButton - JavaFX CheckBox - JavaFX ChoiceBox - JavaFX ComboBox - JavaFX ListView - JavaFX TableView - JavaFX Hussein zayed and many
  • 12. 12 Label Hussein zayed public String getText() public void setText(String text) public final void setTextFill(Paint value) public final void setBackground(Background value) public final void setFont(Font newFont) public final void setTranslateX(double value) public final void setScaleY(double value) public void setPrefSize(double prefWidth, double prefHeight)
  • 13. 13
  • 14. 14 TextFiled public String getText() public void setText(String text) public final void setTextFill(Paint value) public final void setBackground(Background value) public final void setFont(Font newFont) public final void setTranslateX(double value) public final void setScaleY(double value) public void setPrefSize(double prefWidth, double prefHeight)
  • 15. 15
  • 16. 16 Task Design login form include label , TextFiled ,PasswordField , Button