You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project implements a simple library management system using Java Swing..
Java Swing is a part of Java Foundation Classes (JFC) that is used to create window-based applications.
The javax.swing package provides classes for java swing API such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc.
Components Used :
JLabel - To display text as labels
JTextField - For text input
JButton - For buttons
JPanel - To group components in a pane
The main features are:
Adding new books to the library
Viewing all books in the library
Editing book details
Deleting books
Clearing the form fields
Exiting the application
Output:
The program does the following:
It creates GUI components like labels, text fields, and buttons.
It maintains a ArrayList of String arrays to store all the book details. Each String array represents one book.
When the Add button is clicked, it gets the text from all the text fields and creates a String array with the book details. This is added to the ArrayList to store the book.
The View button displays all books in a JTable.
The Edit button allows editing a book's details based on the book ID.
The Delete button removes a book from the ArrayList based on the book ID.
The Clear button simply clears all the text fields.