B Merged
B Merged
BELAGAVI-590018, KARNATAKA.
A PROJECT REPORT
On
DepartmentofComputerScienceandEngineering
(AccreditedbyNBA)
SAPTHAGIRICOLLEGEOFENGINEERING
(AffiliatedtoVisvesvarayaTechnologicalUniversity,Belagavi&ApprovedbyAICTE,NewDelhi.)
ISO9001-2015&14001-2015Certified,AccreditedbyNAACwith‘A’Grade
14/5,Chikkasandra,HesarghattaMainRoad Bengaluru
– 560057.
2024-2025
ABSTRACT
This project presents a Java Swing-based application designed to simulate the basic functionalities of a car
showroom management system. The application features a graphical user interface (GUI) that includes user
authentication, inventory display, car addition, and bill generation for available cars. Upon launching the
application, users are prompted to log in through a secure login screen. Once authenticated, users are
directed to a dashboard containing two main sections: an inventory panel displaying a list of cars with their
details (ID, model, price, status), and an add car panel where new car entries can be input. The inventory
table allows users to select an available car and generate a purchase bill. While the current implementation
demonstrates core functionality, it can be extended to support persistent storage and dynamic data
management. This application serves as a foundational model for more complex automotive dealership
systems and demonstrates the capabilities of Java Swing for building user-friendly desktop applications.
TABLE OF CONTENTS
1 Introduction 1
2 Code 4
3 Screenshots 9
4 References 11
CAR SHOWROOM SYSTEM
INTRODUCTION
In today’s digital age, efficient software solutions are essential for streamlining business operations and
improving customer experience. Car showrooms, which involve managing a variety of vehicles, handling
customer inquiries, and processing purchases, can benefit greatly from computerized systems. This project
presents a desktop-based Car Showroom Management System developed using Java Swing, a part of Java’s
Foundation Classes for building graphical user interfaces.[1]
The system is designed to provide an intuitive and functional interface for managing a showroom’s inventory.
It offers essential features such as user login authentication, a real-time inventory display, a form for adding
new cars, and the ability to generate purchase bills for available vehicles. The use of Java Swing ensures a
responsive and interactive GUI, making the application user-friendly and easy to navigate.[2]
This application aims to simulate a basic showroom environment suitable for educational purposes or as a
prototype for more comprehensive dealership software. Although it currently uses in-memory data and lacks
persistent storage, its modular design allows for future enhancements like database integration and advanced
user roles.[3]
Objectives
The primary objectives of the Car Showroom Management System developed using Java Swing are as follows:
1. To create a user-friendly graphical interface that allows showroom staff to interact with the system
efficiently.
2. To implement a secure login system to restrict access to authorized users only.
3. To provide an organized view of car inventory, displaying details such as model, price, and
availability.
4. To enable the addition of new cars to the showroom inventory through a simple form-based interface.
5. To implement a bill generation feature for available cars, simulating the purchase process.
6. To demonstrate the capabilities of Java Swing in building desktop applications with real-world
relevance.
7. To build a modular and extensible system that can be enhanced with features like database
integration or customer management in the future.[4]
Technology Stack
Programming Language:
Java – Used as the core programming language for implementing the application logic and user
interface.
GUI Framework:
Java Swing – A part of Java Foundation Classes (JFC) used for creating the graphical user interface
(GUI), including frames, panels, buttons, text fields, tables, and dialogs.
Development Environment:
Any Java-supported IDE such as IntelliJ IDEA, Eclipse, or NetBeans can be used for development
and testing.
JDK (Java Development Kit):
Java SE Development Kit (JDK 8 or higher) – Required to compile and run Java Swing applications.
Operating System:
Platform-independent – The application can run on any operating system that supports Java
(Windows, macOS, Linux).[5]
CODE
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
public LoginScreen() {
setTitle("Login - Car Showroom");
setSize(300, 160);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
panel.add(new JLabel("Password:"));
passwordField = new JPasswordField();
panel.add(passwordField);
add(panel);
setVisible(true);
}
add(tabs);
setVisible(true);
}
}
public InventoryPanel() {
setLayout(new BorderLayout());
add(scrollPane, BorderLayout.CENTER);
add(bottomPanel, BorderLayout.SOUTH);
}
if (!status.equalsIgnoreCase("Available")) {
JOptionPane.showMessageDialog(this, "This car is not available for purchase.");
return;
}
public AddCarPanel() {
setLayout(new GridLayout(6, 2));
add(new JLabel("Model:"));
modelField = new JTextField();
add(modelField);
add(new JLabel("Price:"));
priceField = new JTextField();
add(priceField);
add(new JLabel("Status:"));
statusField = new JTextField();
add(statusField);
String id = idField.getText();
String model = modelField.getText();
String price = priceField.getText();
String status = statusField.getText();
SCREENSHOTS
REFERENCES