0% found this document useful (2 votes)
99 views

Javafx JDBC

This document provides instructions for connecting a JavaFX application to a MySQL database using JDBC. It describes creating a Maven project containing files for the user interface, controller, user class, DAO class for database connection, and main application class. The DAO class uses JDBC to insert user-entered form values from the JavaFX interface into a "customer" table in the database.

Uploaded by

shreya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (2 votes)
99 views

Javafx JDBC

This document provides instructions for connecting a JavaFX application to a MySQL database using JDBC. It describes creating a Maven project containing files for the user interface, controller, user class, DAO class for database connection, and main application class. The DAO class uses JDBC to insert user-entered form values from the JavaFX interface into a "customer" table in the database.

Uploaded by

shreya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Javafx to database connection using JDBC: In this example we will insert

the value (user enter the value through the textfileds in .fxml file) into the
table "customer".

Required Files we need to create:


A Maven project as described in the attached zip folder.
1. create a database in Mysql as per following:

CREATE TABLE customer(


CustomerID int(11) PRIMARY KEY AUTO_INCREMENT,
Full_Name varchar(250) NOT NULL,
Password varchar(250) NOT NULL,
EMAIL varchar(250) NOT NULL
);

2. login.fxml : This File will create User Interfaces (UI) for the application
3. Logincontroller.java : This file will control the user Interfaces and main
application
4. User.java : This file represents user class
5. UserDao.java : This file makes a connection with the database (Using JDBC)
6 Main_Application.java : This file will start the execution of the application

See the attached zip folder : "javafx-jdbc".

You might also like