SlideShare a Scribd company logo
UNIT 1
JAVAFX 2.0
JavaFX Fundamentals
 The JavaFX 2.0 API is Java’s next generation GUI toolkit for
developers to build rich cross-platform applications.
 JavaFX 2.0 is based on a scene graph paradigm as opposed to the
traditional inmediate mode style rendering.
 Before the creation of JavaFX, the development of rich Internet
applications involved the gathering of many separate libraries and
APIs to achieve highly functional applications.
 These separate libraries include Media, UI controls, Web, 3D, and 2D
APIs.
 Because integrating these APIs together can be rather difficult, the
talented engineers at Sun Microsystems (now Oracle) created a new
set of JavaFX libraries that rool up all the same capabilities under
one roof.
 JavaFX 2.0 is a pure Java (language) API that allows developers to
leverage existing Java libraries and tools.
Installing Required Sotware
 You’ll need to install the following software in
order to get started with JavaFX:
– Java 7 JDK or greater
– JavaFX 2.0 SDK
– Neteans IDE 7.1 or greater
(http://download.oracle.com/javafx/2.0/system_requi
rements/jfxpub-system_requirements.htm)ñ
Creating a new Application
First Steps
 JavaFX applications extend the javafx.application..Application class. The Application
class provides application life cycle functions such as launching and stopping during
runtime.
 In our main() method’s entry point we launch the JavaFX application by simply passing in
the command line arguments to the Application.launch() method.
 Once the application is in a ready state, the framework internals will invoke the start()
method to begin.
 When the start() method is invoked, a JavaFX javafx.stage.Stage object is available for
the developer to use and manipulate.
public void start(Stage primaryStage) {
primaryStage.setTitle("Conceptos JavaFX 2.0");
Group root = new Group();
Scene scene = new Scene(root, 300, 250, Color.WHITE);
primaryStage.setScene(scene);
primaryStage.show();
}
First Steps
 Analogy with a theatre:
– Scene and Stage: There are one or many scenes, and all scenes are performed on a
stage.
 Stage is equivalent to an application window.
 Scene is a content pane capable of holding zero-to-many Node objects.
 A Node is a fundamental base class for all scene graph nodes to be rendered.
 Similar to a tree data structure, a scene graph will contain children nodes by using a
container class Group.
public void start(Stage primaryStage) {
primaryStage.setTitle("Conceptos JavaFX 2.0");
Group root = new Group();
Scene scene = new Scene(root, 300, 250, Color.WHITE);
primaryStage.setScene(scene);
primaryStage.show();
}
First Steps
 Once the child nodes have been added, we set the primaryStage’s (Stage)
scene and call the show() method on the Stage object to show the JavaFX
window.
public void start(Stage primaryStage) {
primaryStage.setTitle("Conceptos JavaFX 2.0");
Group root = new Group();
Scene scene = new Scene(root, 300, 250, Color.WHITE);
primaryStage.setScene(scene);
primaryStage.show();
}
Drawing Text
 To draw text in JavaFX you will be creating a javafx.scene.text.Text
node to be placed on the scene graph (javafx.scene.Scene).
Text text = new Text(100,100,"JavaFX 2.0");//Create a Text node.
//new Text(posX,posY,text to write)
root.getChildren().add(text); //Add a node in the tree.
Text Properties (I)
Rotation
 In the method setRotate(), we have
to specify the rotation angle (in degrees)
Text text = new Text(100,100,"JavaFX 2.0");//Create a Text node.
text.setRotate(45);
root.getChildren().add(text); //Add a node in the tree.
Text Properties (II)
Font. In each Text node you can create and set the font to be rendered onto the
scene grah.
Text text = new Text(105,50, "JavaFX 2.0");
Font f1 = Font.font("Serif", 30);
text.setFont(f1);
Creating Menus (I)
 Menus are standard ways on windowed platform applications to allow users to select
options.
 First, we create an instance of a MenuBar that will contain one to many menu (MenuItem)
objects.
 Secondly, we create menu (Menu) objects that contain one-to-many menu item
(MenuItem) objects and other Menu objects making submenus.
 Third, we create menu items to be added to Menu objects, such as menu (MenuItem).
MenuBar menuBar = new MenuBar(); //Creating a menubar
Menu menu = new Menu(“File”); //Creating first menu
MenuItem menuitem=new MenuItem(“New”); //Creating first item
menu.getItems().add(menuitem); //adding item to menu
menuBar.getMenus().add(menu); //adding menu to menubar
root.getChildren().add(menuBar); //adding menubar to the
//stage
Creating Menus (II)
 For adding an action when you select a menu Item:
menuitem.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
//action
}
});
Creating Menus (III). Example
MenuBar menuBar = new MenuBar();
Menu menu = new Menu("Opcion de Menú");
MenuItem menuitem1=new MenuItem("Opcion 1");
MenuItem menuitem2=new MenuItem("Opcion 2");
menuitem1.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
System.out.println("Opcion 1");
}
});
menuitem2.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
System.out.println("Opcion 2");
}
});
menu.getItems().add(menuitem1);
menu.getItems().add(menuitem2);
menuBar.getMenus().add(menu);
root.getChildren().add(menuBar);
Creating Menus (III). Example
Button (I)
 For adding a button:
 For adding a button with a description text:
 For adding an action for the button:
Button button1 = new Button();
Button button1 = new Button(“Description”);
button1.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
//action
}
});
Button (II)
 For setting the position of the button in the scene layout:
button1.setLayoutX(90);
button1.setLayoutY(150);
Button with images
 We can create a button with a description and a image:
 The ImageView class is a graph node (Node) used to display an already loaded
javafx.scene.image.Image object.
 Using the ImageView node will enable you to crete
special effects on the image to be displayed without
manipulating the physical Image.
Image img = new Image(getClass().getResourceAsStream("fuego.jpg"));
ImageView imgv= new ImageView(img);
imgv.setFitWidth(40); //We set a width for the image
imgv.setFitHeight(40); //We set a height for the image
Button boton1 = new Button("Generar Incendio",imgv);
Label (I)
 For adding a label:
Label l1 = new Label(“Label Description”);
l1.setLayoutX(90); //Setting the X position
l1.setLayoutY(60); //Setting the Y position
root.getChildren().add(l1);

More Related Content

What's hot

Advance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.SwingAdvance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.Swing
Payal Dungarwal
 
Creating Alloy Widgets
Creating Alloy WidgetsCreating Alloy Widgets
Creating Alloy Widgets
Mobile Data Systems Ltd.
 
"Android" mobilių programėlių kūrimo įvadas #3
"Android" mobilių programėlių kūrimo įvadas #3"Android" mobilių programėlių kūrimo įvadas #3
"Android" mobilių programėlių kūrimo įvadas #3
Tadas Jurelevičius
 
Chapter 03: Eclipse Vert.x - HTTP Based Microservices
Chapter 03: Eclipse Vert.x - HTTP Based MicroservicesChapter 03: Eclipse Vert.x - HTTP Based Microservices
Chapter 03: Eclipse Vert.x - HTTP Based Microservices
Firmansyah, SCJP, OCEWCD, OCEWSD, TOGAF, OCMJEA, CEH
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven Development
Nuvole
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handling
Payal Dungarwal
 
UIAutomatorでボット作ってみた
UIAutomatorでボット作ってみたUIAutomatorでボット作ってみた
UIAutomatorでボット作ってみた
akkuma
 
Using Weka from Windows prompt
Using Weka from Windows promptUsing Weka from Windows prompt
Using Weka from Windows prompt
Alessio Villardita
 
Graphical User Interface (GUI) - 2
Graphical User Interface (GUI) - 2Graphical User Interface (GUI) - 2
Graphical User Interface (GUI) - 2
PRN USM
 
A Series of Fortunate Events - Symfony Camp Sweden 2014
A Series of Fortunate Events - Symfony Camp Sweden 2014A Series of Fortunate Events - Symfony Camp Sweden 2014
A Series of Fortunate Events - Symfony Camp Sweden 2014
Matthias Noback
 
AWT Packages , Containers and Components
AWT Packages , Containers and ComponentsAWT Packages , Containers and Components
AWT Packages , Containers and Components
Sohanur63
 

What's hot (13)

Advance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.SwingAdvance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.Swing
 
Lesson 4
Lesson 4Lesson 4
Lesson 4
 
Creating Alloy Widgets
Creating Alloy WidgetsCreating Alloy Widgets
Creating Alloy Widgets
 
"Android" mobilių programėlių kūrimo įvadas #3
"Android" mobilių programėlių kūrimo įvadas #3"Android" mobilių programėlių kūrimo įvadas #3
"Android" mobilių programėlių kūrimo įvadas #3
 
Chapter 03: Eclipse Vert.x - HTTP Based Microservices
Chapter 03: Eclipse Vert.x - HTTP Based MicroservicesChapter 03: Eclipse Vert.x - HTTP Based Microservices
Chapter 03: Eclipse Vert.x - HTTP Based Microservices
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven Development
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handling
 
UIAutomatorでボット作ってみた
UIAutomatorでボット作ってみたUIAutomatorでボット作ってみた
UIAutomatorでボット作ってみた
 
Using Weka from Windows prompt
Using Weka from Windows promptUsing Weka from Windows prompt
Using Weka from Windows prompt
 
GUI JAVA PROG ~hmftj
GUI  JAVA PROG ~hmftjGUI  JAVA PROG ~hmftj
GUI JAVA PROG ~hmftj
 
Graphical User Interface (GUI) - 2
Graphical User Interface (GUI) - 2Graphical User Interface (GUI) - 2
Graphical User Interface (GUI) - 2
 
A Series of Fortunate Events - Symfony Camp Sweden 2014
A Series of Fortunate Events - Symfony Camp Sweden 2014A Series of Fortunate Events - Symfony Camp Sweden 2014
A Series of Fortunate Events - Symfony Camp Sweden 2014
 
AWT Packages , Containers and Components
AWT Packages , Containers and ComponentsAWT Packages , Containers and Components
AWT Packages , Containers and Components
 

Viewers also liked

FPJUCE - Capitulo2
FPJUCE - Capitulo2FPJUCE - Capitulo2
FPJUCE - Capitulo2
Ing. Giovanny Moncayo
 
Unidad o informatica
Unidad o informaticaUnidad o informatica
Unidad o informatica
Marisa Torrecillas
 
Lenguajes para definir transformaciones
Lenguajes para definir transformacionesLenguajes para definir transformaciones
Lenguajes para definir transformaciones
Luis Alberto Perdomo
 
3 interfaces clases_abstractas_herencia_polimorfismo
3 interfaces clases_abstractas_herencia_polimorfismo3 interfaces clases_abstractas_herencia_polimorfismo
3 interfaces clases_abstractas_herencia_polimorfismoJesus Alberto Iribe Gonzalez
 
Presentacion Java
Presentacion JavaPresentacion Java
Presentacion Java
maeusogo
 
Java orientado a objetos
Java orientado a objetosJava orientado a objetos
Java orientado a objetos
Salvador Fernández Fernández
 

Viewers also liked (9)

FPJUCE - Capitulo2
FPJUCE - Capitulo2FPJUCE - Capitulo2
FPJUCE - Capitulo2
 
Unidad o informatica
Unidad o informaticaUnidad o informatica
Unidad o informatica
 
Tema1
Tema1Tema1
Tema1
 
Tema3
Tema3Tema3
Tema3
 
Tema4
Tema4Tema4
Tema4
 
Lenguajes para definir transformaciones
Lenguajes para definir transformacionesLenguajes para definir transformaciones
Lenguajes para definir transformaciones
 
3 interfaces clases_abstractas_herencia_polimorfismo
3 interfaces clases_abstractas_herencia_polimorfismo3 interfaces clases_abstractas_herencia_polimorfismo
3 interfaces clases_abstractas_herencia_polimorfismo
 
Presentacion Java
Presentacion JavaPresentacion Java
Presentacion Java
 
Java orientado a objetos
Java orientado a objetosJava orientado a objetos
Java orientado a objetos
 

Similar to Unit 1 informatica en ingles

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 Program Photo Viewer1. Write an app called viewer that will .pdf
Java Program Photo Viewer1. Write an app called viewer that will .pdfJava Program Photo Viewer1. Write an app called viewer that will .pdf
Java Program Photo Viewer1. Write an app called viewer that will .pdf
bhim1213
 
JavaFX ALA ppt.pptx
JavaFX ALA ppt.pptxJavaFX ALA ppt.pptx
JavaFX ALA ppt.pptx
BhagyasriPatel1
 
L0020 - The Basic RCP Application
L0020 - The Basic RCP ApplicationL0020 - The Basic RCP Application
L0020 - The Basic RCP Application
Tonny Madsen
 
Java AWT and Java FX
Java AWT and Java FXJava AWT and Java FX
Java AWT and Java FX
pratikkadam78
 
The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)
Daroko blog(www.professionalbloggertricks.com)
 
The java swing_tutorial
The java swing_tutorialThe java swing_tutorial
The java swing_tutorialsumitjoshi01
 
Selenium interview questions and answers
Selenium interview questions and answersSelenium interview questions and answers
Selenium interview questions and answers
kavinilavuG
 
From Swing to JavaFX
From Swing to JavaFXFrom Swing to JavaFX
From Swing to JavaFX
Yuichi Sakuraba
 
6 swt programming
6 swt programming6 swt programming
6 swt programming
Prakash Sweet
 
Ios - Introduction to platform & SDK
Ios - Introduction to platform & SDKIos - Introduction to platform & SDK
Ios - Introduction to platform & SDK
Vibrant Technologies & Computers
 
Swing
SwingSwing
To-Do App With Flutter: Step By Step Guide
To-Do App With Flutter: Step By Step GuideTo-Do App With Flutter: Step By Step Guide
To-Do App With Flutter: Step By Step Guide
Biztech Consulting & Solutions
 
Swings in java
Swings in javaSwings in java
Swings in java
Jyoti Totla
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
Tareq Hasan
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
Rohit Jagtap
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
Ambarish Hazarnis
 
Aspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_cs
Alfa Gama Omega
 

Similar to Unit 1 informatica en ingles (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
 
Java Program Photo Viewer1. Write an app called viewer that will .pdf
Java Program Photo Viewer1. Write an app called viewer that will .pdfJava Program Photo Viewer1. Write an app called viewer that will .pdf
Java Program Photo Viewer1. Write an app called viewer that will .pdf
 
JavaFX ALA ppt.pptx
JavaFX ALA ppt.pptxJavaFX ALA ppt.pptx
JavaFX ALA ppt.pptx
 
L0020 - The Basic RCP Application
L0020 - The Basic RCP ApplicationL0020 - The Basic RCP Application
L0020 - The Basic RCP Application
 
Java AWT and Java FX
Java AWT and Java FXJava AWT and Java FX
Java AWT and Java FX
 
The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)
 
The java swing_tutorial
The java swing_tutorialThe java swing_tutorial
The java swing_tutorial
 
Selenium interview questions and answers
Selenium interview questions and answersSelenium interview questions and answers
Selenium interview questions and answers
 
From Swing to JavaFX
From Swing to JavaFXFrom Swing to JavaFX
From Swing to JavaFX
 
6 swt programming
6 swt programming6 swt programming
6 swt programming
 
Ios - Introduction to platform & SDK
Ios - Introduction to platform & SDKIos - Introduction to platform & SDK
Ios - Introduction to platform & SDK
 
Swing
SwingSwing
Swing
 
To-Do App With Flutter: Step By Step Guide
To-Do App With Flutter: Step By Step GuideTo-Do App With Flutter: Step By Step Guide
To-Do App With Flutter: Step By Step Guide
 
Swings in java
Swings in javaSwings in java
Swings in java
 
28 awt
28 awt28 awt
28 awt
 
Eclipse Tricks
Eclipse TricksEclipse Tricks
Eclipse Tricks
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
 
Aspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_cs
 

More from Marisa Torrecillas

Unit 2 english
Unit 2  englishUnit 2  english
Unit 2 english
Marisa Torrecillas
 
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx_español
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx_españolUnidad 2. creación_de_un_escenario_de_simulación_con_jav afx_español
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx_españolMarisa Torrecillas
 
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afxUnidad 2. creación_de_un_escenario_de_simulación_con_jav afx
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afxMarisa Torrecillas
 
Unidad 2(español)
Unidad 2(español)Unidad 2(español)
Unidad 2(español)
Marisa Torrecillas
 
Unidad 1 (español)
Unidad 1 (español)Unidad 1 (español)
Unidad 1 (español)
Marisa Torrecillas
 
Information and techonology texts
Information and techonology textsInformation and techonology texts
Information and techonology textsMarisa Torrecillas
 
Plan de autoproteccion
Plan de autoproteccionPlan de autoproteccion
Plan de autoproteccion
Marisa Torrecillas
 
Unidad o informatica en ingles
Unidad o informatica en inglesUnidad o informatica en ingles
Unidad o informatica en ingles
Marisa Torrecillas
 
PRESENT PERFECT VS PAST SIMPLE IN ENGLISH
PRESENT PERFECT VS PAST SIMPLE IN ENGLISHPRESENT PERFECT VS PAST SIMPLE IN ENGLISH
PRESENT PERFECT VS PAST SIMPLE IN ENGLISH
Marisa Torrecillas
 
First aids 3
First aids 3First aids 3
First aids 3
Marisa Torrecillas
 

More from Marisa Torrecillas (20)

Unidad 0 (nueva) español
Unidad 0 (nueva) españolUnidad 0 (nueva) español
Unidad 0 (nueva) español
 
Unit 2 english
Unit 2  englishUnit 2  english
Unit 2 english
 
Unidad 2(español)
Unidad 2(español)Unidad 2(español)
Unidad 2(español)
 
Unit 1 english
Unit 1 englishUnit 1 english
Unit 1 english
 
Unidad 1 (español)
Unidad 1 (español)Unidad 1 (español)
Unidad 1 (español)
 
Unit 0 english
Unit 0  englishUnit 0  english
Unit 0 english
 
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx_español
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx_españolUnidad 2. creación_de_un_escenario_de_simulación_con_jav afx_español
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx_español
 
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afxUnidad 2. creación_de_un_escenario_de_simulación_con_jav afx
Unidad 2. creación_de_un_escenario_de_simulación_con_jav afx
 
Unit i informatica en ingles
Unit i informatica en inglesUnit i informatica en ingles
Unit i informatica en ingles
 
Unidad 2(español)
Unidad 2(español)Unidad 2(español)
Unidad 2(español)
 
Unidad 1 (español)
Unidad 1 (español)Unidad 1 (español)
Unidad 1 (español)
 
Contrastive essay
Contrastive essayContrastive essay
Contrastive essay
 
Ed and –ing clauses
Ed and –ing clausesEd and –ing clauses
Ed and –ing clauses
 
Information and techonology texts
Information and techonology textsInformation and techonology texts
Information and techonology texts
 
Plan de autoproteccion
Plan de autoproteccionPlan de autoproteccion
Plan de autoproteccion
 
Unidad o informatica en ingles
Unidad o informatica en inglesUnidad o informatica en ingles
Unidad o informatica en ingles
 
PRESENT PERFECT VS PAST SIMPLE IN ENGLISH
PRESENT PERFECT VS PAST SIMPLE IN ENGLISHPRESENT PERFECT VS PAST SIMPLE IN ENGLISH
PRESENT PERFECT VS PAST SIMPLE IN ENGLISH
 
First aids 3
First aids 3First aids 3
First aids 3
 
Fr señales de seguridad
Fr señales de seguridadFr señales de seguridad
Fr señales de seguridad
 
éCrans fr definitif
éCrans fr  definitiféCrans fr  definitif
éCrans fr definitif
 

Recently uploaded

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 

Recently uploaded (20)

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 

Unit 1 informatica en ingles

  • 2. JavaFX Fundamentals  The JavaFX 2.0 API is Java’s next generation GUI toolkit for developers to build rich cross-platform applications.  JavaFX 2.0 is based on a scene graph paradigm as opposed to the traditional inmediate mode style rendering.  Before the creation of JavaFX, the development of rich Internet applications involved the gathering of many separate libraries and APIs to achieve highly functional applications.  These separate libraries include Media, UI controls, Web, 3D, and 2D APIs.  Because integrating these APIs together can be rather difficult, the talented engineers at Sun Microsystems (now Oracle) created a new set of JavaFX libraries that rool up all the same capabilities under one roof.  JavaFX 2.0 is a pure Java (language) API that allows developers to leverage existing Java libraries and tools.
  • 3. Installing Required Sotware  You’ll need to install the following software in order to get started with JavaFX: – Java 7 JDK or greater – JavaFX 2.0 SDK – Neteans IDE 7.1 or greater (http://download.oracle.com/javafx/2.0/system_requi rements/jfxpub-system_requirements.htm)ñ
  • 4. Creating a new Application
  • 5. First Steps  JavaFX applications extend the javafx.application..Application class. The Application class provides application life cycle functions such as launching and stopping during runtime.  In our main() method’s entry point we launch the JavaFX application by simply passing in the command line arguments to the Application.launch() method.  Once the application is in a ready state, the framework internals will invoke the start() method to begin.  When the start() method is invoked, a JavaFX javafx.stage.Stage object is available for the developer to use and manipulate. public void start(Stage primaryStage) { primaryStage.setTitle("Conceptos JavaFX 2.0"); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); primaryStage.setScene(scene); primaryStage.show(); }
  • 6. First Steps  Analogy with a theatre: – Scene and Stage: There are one or many scenes, and all scenes are performed on a stage.  Stage is equivalent to an application window.  Scene is a content pane capable of holding zero-to-many Node objects.  A Node is a fundamental base class for all scene graph nodes to be rendered.  Similar to a tree data structure, a scene graph will contain children nodes by using a container class Group. public void start(Stage primaryStage) { primaryStage.setTitle("Conceptos JavaFX 2.0"); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); primaryStage.setScene(scene); primaryStage.show(); }
  • 7. First Steps  Once the child nodes have been added, we set the primaryStage’s (Stage) scene and call the show() method on the Stage object to show the JavaFX window. public void start(Stage primaryStage) { primaryStage.setTitle("Conceptos JavaFX 2.0"); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); primaryStage.setScene(scene); primaryStage.show(); }
  • 8. Drawing Text  To draw text in JavaFX you will be creating a javafx.scene.text.Text node to be placed on the scene graph (javafx.scene.Scene). Text text = new Text(100,100,"JavaFX 2.0");//Create a Text node. //new Text(posX,posY,text to write) root.getChildren().add(text); //Add a node in the tree.
  • 9. Text Properties (I) Rotation  In the method setRotate(), we have to specify the rotation angle (in degrees) Text text = new Text(100,100,"JavaFX 2.0");//Create a Text node. text.setRotate(45); root.getChildren().add(text); //Add a node in the tree.
  • 10. Text Properties (II) Font. In each Text node you can create and set the font to be rendered onto the scene grah. Text text = new Text(105,50, "JavaFX 2.0"); Font f1 = Font.font("Serif", 30); text.setFont(f1);
  • 11. Creating Menus (I)  Menus are standard ways on windowed platform applications to allow users to select options.  First, we create an instance of a MenuBar that will contain one to many menu (MenuItem) objects.  Secondly, we create menu (Menu) objects that contain one-to-many menu item (MenuItem) objects and other Menu objects making submenus.  Third, we create menu items to be added to Menu objects, such as menu (MenuItem). MenuBar menuBar = new MenuBar(); //Creating a menubar Menu menu = new Menu(“File”); //Creating first menu MenuItem menuitem=new MenuItem(“New”); //Creating first item menu.getItems().add(menuitem); //adding item to menu menuBar.getMenus().add(menu); //adding menu to menubar root.getChildren().add(menuBar); //adding menubar to the //stage
  • 12. Creating Menus (II)  For adding an action when you select a menu Item: menuitem.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { //action } });
  • 13. Creating Menus (III). Example MenuBar menuBar = new MenuBar(); Menu menu = new Menu("Opcion de Menú"); MenuItem menuitem1=new MenuItem("Opcion 1"); MenuItem menuitem2=new MenuItem("Opcion 2"); menuitem1.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { System.out.println("Opcion 1"); } }); menuitem2.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { System.out.println("Opcion 2"); } }); menu.getItems().add(menuitem1); menu.getItems().add(menuitem2); menuBar.getMenus().add(menu); root.getChildren().add(menuBar);
  • 15. Button (I)  For adding a button:  For adding a button with a description text:  For adding an action for the button: Button button1 = new Button(); Button button1 = new Button(“Description”); button1.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { //action } });
  • 16. Button (II)  For setting the position of the button in the scene layout: button1.setLayoutX(90); button1.setLayoutY(150);
  • 17. Button with images  We can create a button with a description and a image:  The ImageView class is a graph node (Node) used to display an already loaded javafx.scene.image.Image object.  Using the ImageView node will enable you to crete special effects on the image to be displayed without manipulating the physical Image. Image img = new Image(getClass().getResourceAsStream("fuego.jpg")); ImageView imgv= new ImageView(img); imgv.setFitWidth(40); //We set a width for the image imgv.setFitHeight(40); //We set a height for the image Button boton1 = new Button("Generar Incendio",imgv);
  • 18. Label (I)  For adding a label: Label l1 = new Label(“Label Description”); l1.setLayoutX(90); //Setting the X position l1.setLayoutY(60); //Setting the Y position root.getChildren().add(l1);