This is simple student management system desktop application for school project using jdbc driver and Jframe.
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
The workspace contains two folders by default, where:
src
: the folder to maintain sourceslib
: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the bin
folder by default.
If you want to customize the folder structure, open
.vscode/settings.json
and update the related settings there.
The JAVA PROJECTS
view allows you to manage your dependencies. More details can be found here.
Certainly! Here's a basic README.md
for your Student Management System project:
Certainly! Here's an updated README.md
for your Student Management System project that includes the MySQL setup steps:
A simple Java Swing application for managing student information. It allows you to add, delete, and search for student records.
- Add student records with details such as name, ID, grade, date of birth, gender, contact, and email.
- Reset form fields.
- Delete student records.
- Search for a student by ID.
- Connects to a MySQL database to store and retrieve student data.
Before running the application, you need the following:
- Java Development Kit (JDK)
- MySQL Server
- MySQL Connector/J library (JDBC driver)
- A MySQL database named "student"
- A MySQL user with the username "root" and password "user" (You can modify the database credentials in the code)
-
Open a MySQL client (e.g., MySQL Workbench or the MySQL command-line client).
-
To list all databases, run the following command:
SHOW DATABASES;
-
Create a new database named "student" if it doesn't already exist:
CREATE DATABASE student;
-
Switch to the "student" database:
USE student;
-
Verify that you're in the "student" database:
SELECT DATABASE();
-
Create a table named "students" to store student records. The table structure should match the fields you have in your Java application (name, ID, grade, date of birth, gender, contact, and email). Here's an example table structure:
CREATE TABLE students ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255), student_id VARCHAR(255) UNIQUE, grade VARCHAR(255), date_of_birth DATE, gender VARCHAR(10), contact VARCHAR(20), email VARCHAR(255) );
-
You can view the table structure with:
DESCRIBE students;
-
Now you have the "student" database and the "students" table ready to use with your Java application.
-
Clone the repository:
git clone https://github.com/yourusername/StudentManagementSystem.git
-
Open the project in your preferred Java IDE (e.g., VS Code, IntelliJ IDEA, or Eclipse).
-
Configure your MySQL database settings in the code:
private static final String DB_URL = "jdbc:mysql://localhost:3306/student"; private static final String DB_USER = "root"; private static final String DB_PASSWORD = "user";
-
Run the application.
-
Launch the application.
-
Enter student details, such as name, ID, grade, date of birth, gender, contact, and email.
-
Click the "Add Student" button to add a student record.
-
Use the "Reset" button to clear the input fields.
-
Select a record in the table and click the "Delete Record" button to remove it.
-
Use the "Search by ID" field to search for a student by ID.
Feel free to contribute to this project by creating pull requests or reporting issues on GitHub.
Feel free to customize the README file to include additional information, screenshots, or instructions as needed. You can then push the README file to your GitHub repository to provide documentation for your project.
This updated README includes MySQL setup steps and a sample table structure for the "students" table in the MySQL database. You can further customize it as needed.