Skip to content

ngozz/MySQLProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

XAMPP

I used XAMPP to create a MySQL database. Here’s the information.

Database name is “mysql_db”

image

Table name is “oopproject” with 7 columns

image

Here’s the detail of each element.

image

Set username to “root” and password to “hieu.”

The MySQL library (JAR file) is included inside the source code. Open my project and associate the file with your IDE to and it will work.

Demonstration

image

Next, I'll demonstrate each feature. I’ll begin with the first one, “Add user.” We need to create a form that can accept input from users. Here’s 2 hours of my life. Yeah, I coded everything. JavaSwing sucks.

image

The “Reset” button will clear all text fields.

To make it simple, the “edit” feature will use the same form as the “add” feature. Instead of reusing the form, I added both to the original form.

The “delete” feature is much easier. I used JOptionPane to create a single input form.

image

Next is the search feature

This is the before table.

image

This is after doing the search.

image

Thanks to javax.swing.table.TableRowSorter, it’s a search feature inside the table, not the code itself.

Let's move on to the last two features Again, we need to create a form for the user input

image

Pressing “Thống kê” will print out a table that includes information of all contracts which have ‘start dates’ between the given period of time.

image

Here’s what the last feature output looks like. All credit goes to JOptionPane.

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages