Posts

JavaFX 8 Tutorial 59 - XYCharts (ScatterChart, LineChart, AreaChart, Sta...

Image
The Code written in this tutorial is: package javafx.pkg8.tutorial.pkg59.xycharts; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.chart.AreaChart; import javafx.scene.chart.BarChart; import javafx.scene.chart.CategoryAxis; import javafx.scene.chart.LineChart; import javafx.scene.chart.NumberAxis; import javafx.scene.chart.ScatterChart; import javafx.scene.chart.StackedAreaChart; import javafx.scene.chart.StackedBarChart; import javafx.scene.chart.XYChart; import javafx.scene.chart.XYChart.Series; import javafx.scene.layout.StackPane; import javafx.stage.Stage; /**  *  * @author Ram  */ public class JavaFX8Tutorial59XYCharts extends Application {         @Override     public void start(Stage primaryStage) {                 primaryStage.setTitle("JavaFX...

JavaFX 8 Tutorial 58 - Pie Chart and Mouse Event Handler

Image
The Code written in this tutorial is : /*  * To change this license header, choose License Headers in Project Properties.  * To change this template file, choose Tools | Templates  * and open the template in the editor.  */ package tutorial.pkg56.pie.chart; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.chart.PieChart; import javafx.scene.control.Label; import javafx.scene.input.MouseEvent; import javafx.scene.layout.BorderPane; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.stage.Stage; /**  *  * @author Ram  */ public class Tutorial56PieChart extends Application {     private final ObservableList<PieChart.Data> details = FXCollections.observableArrayList();     private BorderPane root;     private Pi...

JavaFX 8 Tutorial 57 - Pie Chart and CSS

Image
The code written in this tutorial is: package tutorial.pkg56.pie.chart; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.chart.PieChart; import javafx.scene.control.Label; import javafx.scene.input.MouseEvent; import javafx.scene.layout.BorderPane; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.stage.Stage; /**  *  * @author Ram  */ public class Tutorial56PieChart extends Application {     private final ObservableList<PieChart.Data> details = FXCollections.observableArrayList();     private BorderPane root;     private PieChart pieChart;         @Override     public void start(Stage primaryStage) {                 primaryStage.setTitle("JavaFX 8 Tutorial ...

JavaFX 8 Tutorial 56 - Pie Chart

Image
The Code written in this tutorial is: package tutorial.pkg56.pie.chart; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.chart.PieChart; import javafx.scene.control.Label; import javafx.scene.input.MouseEvent; import javafx.scene.layout.BorderPane; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.stage.Stage; /**  *  * @author Ram  */ public class Tutorial56PieChart extends Application {     private final ObservableList<PieChart.Data> details = FXCollections.observableArrayList();     private BorderPane root;     private PieChart pieChart;       @Override     public void start(Stage primaryStage) {               primaryStage.setTitle("J...

JavaFX 8 Tutorial 55 - Centering Image Using StackPane

Image
package tutorial.pkg55.centering.image; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; import javafx.scene.shape.Ellipse; import javafx.stage.Stage; /**  *  * @author Ram  */ public class Tutorial55CenteringImage extends Application {         @Override     public void start(Stage primaryStage) {         primaryStage.setTitle("JavaFX 8 Tutorial 55 - Centering Image Using StackPane");                 StackPane root = new StackPane();         Scene scene = new Scene(root, 400, 200);                 Image img = new Image("file:Javafx.jpg", 100, 150, true, true);         ImageView iv = new ImageView(img);      ...

JavaFX 8 Tutorial 54 - Centering Text In Scene

Image
package tutorial.pkg54.centering.text; import javafx.application.Application; import javafx.geometry.VPos; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.scene.text.Text; import javafx.stage.Stage; /**  *  * @author Ram  */ public class Tutorial54CenteringText extends Application {         @Override     public void start(Stage primaryStage) {         primaryStage.setTitle("JavaFX 8 Tutorial 54 - Centering Text In Scene");         Group root = new Group();         Scene scene = new Scene(root, 400, 200);                 Text text = new Text("JavaFX 8 Tutorial 54 - Centering Text In Scene");         text.setTextOrigin(VPos.TOP);         text.setFont(Font.font(null, FontWeight.BOLD, 15)); ...

JavaFX 8 Tutorial 53 - JavaFX Application Deployment

Image
Steps for JavaFX Application Deployment: 1.    Install Inno Setup (for exe installer) Link: http://www.jrsoftware.org/download.php/is.exe 2.    Install WIX Setup (for msi installer) Link: http://wixtoolset.org/releases/v3.10/stable 3.    Set Environment variables for Inno setup Path: C:\Program Files (x86)\Inno Setup 5 4.    Set Environment variables for WIX setup Path: C:\Program Files (x86)\WiX Toolset v3.10\bin 5.    Add Icon to application     primaryStage.setTitle("User Info App ");     primaryStage.getIcons().add(new Image("file:user-icon.png")); 6.    Open build.xml and Add Following code in it at last <target name="-post-jfx-deploy">     <fx:deploy verbose="true" nativeBundles="exe" outdir="${basedir}/${dist.dir}" outfile="${application.title}">         <fx:application name="${application.title}" mainClass="${javafx.mai...