Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adminltr/java-library-crud
Basic CRUD Java library system
https://github.com/adminltr/java-library-crud
crud java mvc mysql netbeans swing
Last synced: about 2 months ago
JSON representation
Basic CRUD Java library system
- Host: GitHub
- URL: https://github.com/adminltr/java-library-crud
- Owner: adminLTR
- Created: 2023-10-15T23:48:50.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-16T04:09:22.000Z (about 1 year ago)
- Last Synced: 2024-05-03T14:04:55.216Z (8 months ago)
- Topics: crud, java, mvc, mysql, netbeans, swing
- Language: Java
- Homepage:
- Size: 371 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java-Library-CRUD
Basic CRUD Java library system example using Java Swing and MySql
Author: LTprogramsDocumentation
Intallations
Java installation
To start using this app, you should first have installed java on your computer, you
can install the JDK and JRE using these links:
JDK: https://www.oracle.com/pe/java/technologies/downloads/
JRE: https://www.java.com/es/download/ie_manual.jsp
JDK 20 and JRE 8 were used to build this app, in case you have any version problem try to download these software versions or instead try to update the version in configuration filesNetBeans installation
This app was built using NetBeans IDE 18, but you can use any other program. Keep in mind some configuration files might cause some issues. However, you can download NetBeans using this link:
NetBeans IDE: https://netbeans.apache.org/XAMPP installation
It was used MySQL as the DBMS (Data Base Managment System), but you can use any other if you want, but remember that every DBMS has its own driver to work with java, so be sure you download the correct driver in the next step. In this case, I used XAMPP 8.0.28, but there is no problem if you download any other version.
XAMPP: https://www.apachefriends.org/download.htmlJDBC installation
As I mentioned before, you must install the JDBC driver to work with databases, and each DBMS has its own JDBC version, so be sure you install the correct driver if you are using any other DBMS. If you're following me, you can install MySQL JDBC driver in this link, I'm using 5.1.49 version:
JDBC: https://downloads.mysql.com/archives/get/p/3/file/mysql-connector-java-5.1.49.zip
Once you have installed it, you should include the .jar file in Libraries folder as in the image:
That's all installation you have to do, if you arrive to this point, congratulations, you can keep reading the documentation if you want. In case you had problems in the previous steps, you can contact me or follow any tutorial on YouTube. Good Luck!SQL Script
In the main folder, you will find 'library.sql' file, you can execute it in your DBMS or export it using the export function and selecting this file.Files and Folders
I'm using MVC (Model View Controller) architecture, so you will find 3 packages in src folder
Model
Here are two classes, Book and JConnection, they are the entities used in this small project
-
Book: Class with some attributes such as name(String), author(String), stock(int), category(String), etc. It has its Constructors and getters/setters -
JConnection: Class to create the connection between the database and the java app. It has some attributes such as user and password, which are the credentials to link the DDBB with our program, in case you have other credentials, just change the variable values to your own ones
View
It has just one JFrame class to build the GUI (Graphical User Interface), you can adjust the design up to you, or add some other buttons or functionalities.
Controller
It's got only one class named Controller, that links the view with the models and set buttons functionalities
App file
This is the main class, in case you had any doubts, you can contact me, I left some comments in the code anyway.