Posts

JavaFX 8 Tutorial 64 Spring Boot CRUD with FXML

Image
JavaFX Spring Boot App The application frontend created using JavaFX and backend services are implemented using Spring Boot. The app demonstrate simple CRUD operation and switching between two scenes with Login and User Dashboard view. Getting Started: Clone the project in your workspace using command - git clone  https://github.com/RamAlapure/JavaFXSpringBootApp.git Then import as maven project into eclipse. Check Java 8 configuration if there is any error. Update project as maven if dependencies are not resolved. Create a schema javafx in your mysql database or open configuration file application.properties from resources directory and change schema name to your schema name and also change username and password. If all goes well just run Main.java

JavaFX 8 Tutorial 63 - Jasper Report With SQL Query

Image
 JavaFX 8 Tutorial 63 - Jasper Report With SQL Query /*  * 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 org.ramalapure.userinfoapp; import java.awt.HeadlessException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import javax.swing.JFrame; import javax.swing.JOptionPane; import net.sf.jasperreports.engine.JasperCompileManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.design.JRDesignQuery; import net.sf.jasperreports.engine.design.JasperDesign; import net.sf.jasperreports.engine.xml.JRXmlLoader; import net.sf.jasperreports.view.JRViewer; /**  *  * @author Ram  */ public class PrintReport  extends JFrame{           Connection conn

JavaFX 8 Tutorial 62 - Jasper Report

Image
JavaFX 8 Tutorial 62 – Jasper Report Steps: 1.    Download Jasper Report Jar Link - https://sourceforge.net/projects/jasperreports/files/jasperreports/JasperReports%206.2.0/ 2.    Download iReport Plugin for Netbeans Link – http://plugins.netbeans.org/plugin/4425/ireport 3.    To install iReport Plugin go to -> Tools -> Plugin -> Dowloaded -> Add Plugins. 4.    Add Database jar (in my case its sqlite-jdbc.jar ) and Project Jar ( User_Info_App.jar ) to iReport classpath, to do so go to -> Tools -> Options -> select iReport -> Add Database  and Project jar. 5.    On welcome to iReport Page click on step 1 -> create new Database JDBC Connection -> Give ·        Name – Demo ·        JDBC Driver – org.sqlite.JDBC ·        JDBC URL - jdbc:sqlite:C:\Users\RAM ALAPURE\Documents\NetBeansProjects\User Info App\UserDatabase.sqlite 6.    On welcome to iReport Page click on step 2 -> select blank report -> Open This Template -> Give ·        Repo

JavaFX 8 Tutorial 61 - Retrive Database Values Into CheckBox

Image
The code written in this tutorial is -                     // Retrive Hobbies Into CheckBox                                         if(rs.getString("Hobbies")!= null){                         checkBox1.setSelected(false);                         checkBox2.setSelected(false);                         checkBox3.setSelected(false);                                                 //hobbies in the string formate - [Playing , Dancing]                         System.out.println(rs.getString("Hobbies"));                                                 String checkBoxString = rs.getString("Hobbies").replace("[", "").replace("]", "");                         System.out.println(checkBoxString);                                                 //now can converert to a list, strip out commas and spaces                         List<String> hobbylist = Arrays.asList(checkBoxString.split("\\s*,\\s*"

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 8 Tutorial 59 - Different XYCharts");                 StackPane root =

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 PieChart pieChart;     private Label label;         @Override

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 58 - Pie Chart and Mouse Event Handler");         details.addAll(new PieChart.Data("Printing Cost&