SlideShare a Scribd company logo
1 of 17
Download to read offline
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

More Related Content

What's hot

An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.jsEmanuele DelBono
 
Android game development
Android game developmentAndroid game development
Android game developmentOlivia2590
 
Android styles and themes
Android   styles and themesAndroid   styles and themes
Android styles and themesDeepa Rani
 
Ch 3 event driven programming
Ch 3 event driven programmingCh 3 event driven programming
Ch 3 event driven programmingChaffey College
 
Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1PRN USM
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC ArchitecturePrem Sanil
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in javaGoogle
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Javayht4ever
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)Manisha Keim
 
Java database connectivity with MYSQL
Java database connectivity with MYSQLJava database connectivity with MYSQL
Java database connectivity with MYSQLAdil Mehmoood
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSaba Ameer
 
Java GUI PART II
Java GUI PART IIJava GUI PART II
Java GUI PART IIOXUS 20
 

What's hot (20)

WPF
WPFWPF
WPF
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.js
 
Android game development
Android game developmentAndroid game development
Android game development
 
Android styles and themes
Android   styles and themesAndroid   styles and themes
Android styles and themes
 
Ch 3 event driven programming
Ch 3 event driven programmingCh 3 event driven programming
Ch 3 event driven programming
 
Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
ReactJS presentation.pptx
ReactJS presentation.pptxReactJS presentation.pptx
ReactJS presentation.pptx
 
Struts
StrutsStruts
Struts
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Java
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Java database connectivity with MYSQL
Java database connectivity with MYSQLJava database connectivity with MYSQL
Java database connectivity with MYSQL
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
Java GUI PART II
Java GUI PART IIJava GUI PART II
Java GUI PART II
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 

Similar to 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.pdfSakkaravarthiS1
 
JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)Alexander Casall
 
Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)Stephen Chin
 
Hinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile DojoHinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile DojoStephen Chin
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1rajivmordani
 
Visage Android - Cleaner APIs, Cleaner UIs
Visage Android - Cleaner APIs, Cleaner UIsVisage Android - Cleaner APIs, Cleaner UIs
Visage Android - Cleaner APIs, Cleaner UIsStephen Chin
 
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 JavaTakaaki Sugiyama
 
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 GuideStephen Chin
 
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)Yevgeniy Brikman
 
How to create interactive infographics
How to create interactive infographicsHow to create interactive infographics
How to create interactive infographicsMayuree Srikulwong
 
JavaFX for Java Developers
JavaFX for Java DevelopersJavaFX for Java Developers
JavaFX for Java DevelopersSten Anderson
 
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docx
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docxWebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docx
WebApplication1srcconfMANIFEST.MFManifest-Version 1.0.docxmelbruce90096
 

Similar to 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
 
Introduction to JavaFX
Introduction to JavaFXIntroduction to JavaFX
Introduction to JavaFX
 
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
 

More from hussein zayed

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.pptxhussein zayed
 
Random Variables and Distributions
Random Variables and DistributionsRandom Variables and Distributions
Random Variables and Distributionshussein zayed
 
substring & subSquence & find problem solving
substring & subSquence & find problem solving substring & subSquence & find problem solving
substring & subSquence & find problem solving hussein zayed
 
Inheritance & polymorphism java oop
Inheritance & polymorphism java oopInheritance & polymorphism java oop
Inheritance & polymorphism java oophussein zayed
 
File Transport Protocol
File Transport ProtocolFile Transport Protocol
File Transport Protocolhussein zayed
 

More from 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
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

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