Git Product home page Git Product logo

automobile-management-system's Introduction

MySQL-and-JDBC-GUI-Java

This project creates a MySQL database for automobile shopping management system and connects to it through the JDBC API.

This project uses interactive GUIs that is connected to a MySQL database. Users can insert, update, delete or filter and search datas for any tables and any records in all GUIs, and these modifications be done to the underlying database as well. After any modifications are done, the GUIs will be updated to reflect the changes in the database. GUI classes was created using NetBeans and IntelliJ IDEA.

Requirements

This program requires Java, MySQL, and JDBC API. I used Java 8 (with JDK 8u172) and MySQL Community Server 5.7.22 (including MySQL Server and MySQL Workbench) to create this project. Connector/J (Default JDBC driver of NetBeans IDE already including MySQL Connector/J 5.1.23 version) is also needed for Java to work with MySQL. Also I used JCalendar library for date type inputs in IlanWindow GUI.

Instructions

After everything has been installed you will need to create the database. Start MySQL in Terminal or on MySQL Workbench, and use create-db-tables.sql file to create a database called arac_alisveris and tables are needed for this database. You can then use the database with USE arac_alisveris;. After the database is in use, you can create records for all tables by running the insert-records.sql file. The database, tables and all records should be created, and the data should now be present in the database. You can use SELECT * FROM Tbl_Ilan; to verify.

To run the Java program, you will need to edit conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/arac_alisveris", "root", "123456"); part in getConnection() methods in all GUI classes except MainWindow.java so they match your MySQL database name, username and password. If this is not done, then the program will not be able to connect to MySQL. After these steps have been done, you can compile and run the Java code. When the program begins, you should see a Main GUI with the menu, then choose a table and database records will displayed. You can insert, delete, and update records with table GUIs (IlanWindow, ArabaWindow, YakitTuruWindow, VitesTuruWindow, RenkWindow, SehirWindow), filter and search with FiltrelemeWindow GUI. Running this program using NetBeans IDE 8.2 or JetBrains IntelliJ IDEA is highly recommended.

Demonstration

The MainWindow GUI is displayed when the program begins. Then choose a table GUI, for example ArabaWindow GUI. Notice that when the user clicks on a row, the text fields and comboboxes are updated.

This data in the GUI matches the data in the MySQL database.

We will now insert a record. We fill in the text fields (if ID field don't filled it's auto setted through auto increment option of database) and click "Insert". You can see that the new record has been added to the bottom of the table, and the database reflects the changes.

We can update a row in the table by clicking on the row in the table, modifying the text field(s), and clicking update.

We can delete a row by clicking on the row in the table (or fill ID text field) and clicking "Delete" button.

Finally, we can use FiltrelemeWindow GUI to filter and search all tables for needed attribute and order with ascending and descending options.

Contributors

Oğuz Aktaş

automobile-management-system's People

Contributors

150201170 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.