- Ashwin Thomas Mathew
- Kevin Varghese Roy
- Course: 244SECUBC201 – Object Oriented Programming using Java
Searching for books manually in a library or large collection is time-consuming and inefficient. There is a need for a digital system that allows users to quickly search for books and manage book records efficiently.
The Book Finder System provides a GUI-based solution to search and add books using Java and MySQL database connectivity.
- To develop a Java Swing-based GUI application.
- To implement Object-Oriented Programming concepts.
- To integrate MySQL database using JDBC.
- To allow users to search books by title or author.
- To allow insertion of new book records.
- To implement exception handling for system reliability.
- 🔍 Search books by title or author
- ➕ Add new books to the database
- 📄 Display book details (ID, Title, Author, Category, Availability)
- 🗄 MySQL database integration
- ⚠ Exception handling using try-catch
- 🖥 User-friendly Java Swing GUI
- Java (JDK 8 or above)
- Java Swing (GUI Components)
- MySQL Database
- JDBC (Java Database Connectivity)
- Apache NetBeans IDE
-
Install Java JDK (8 or above).
-
Install MySQL Server.
-
Create a database named:
library -
Create a table named:
booksWith fields:
- id (INT, Primary Key, Auto Increment)
- title (VARCHAR)
- author (VARCHAR)
- category (VARCHAR)
- availability (VARCHAR)
-
Open the project in NetBeans IDE.
-
Update database username and password inside
DBConnection.java. -
Run
BookSearchGUI.java. -
The application window will open.
Input:
Search Keyword: 1984
Output:
- ID: 15
- Title: 1984
- Author: George Orwell
- Category: Dystopian Novel
- Availability: Available
Input:
- Title: The Secret of the Nagas
- Author: Amish Tripati
- Category: Mythology
- Availability: Available
Output:
Message Displayed:
Book Added Successfully!
Record successfully inserted into MySQL database.
- Encapsulation – Private variables with getters/setters
- Inheritance – TextBook and ReferenceBook extend Book class
- Polymorphism – Method overriding
- Abstraction – Base class structure
- Exception Handling – Try-catch blocks for SQL and input errors
- JDBC Connectivity – Real-time database interaction
The Book Finder System successfully demonstrates Java Swing GUI development, OOP concepts, exception handling, and JDBC database connectivity. The system provides an efficient and user-friendly way to search and manage book records.