In this post, we’ll look at how to use different Swing component + JDBC connection, and demonstrate using an example MySQL.
In this post, we are going to demonstrate Swing components + JDBC connection for operating CURD operations. Student information will be stored in a relational database.
To do this, we will have to :
- Create the database and simple table which record the student detail information
- Create a simple java application project
- Inherit the JFrame to work with swing framework
Download the Java Application project from this link. Click me to download!
Create a database:
CREATE DATABASE studentmanagement;
CREATE TABLE student (
id int primary key auto_increment,
firstname varchar(50) not null,
middlename varchar(50) default null,
lastname varchar(50) not null,
email varchar(100) default null,
phone_number varchar(15) default null
);