Avinash
Avinash
BACHELOR TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING (DATA SCIENCE)
Submitted by
V. KISHORE 24102A030136
D.VASANTH KUMAR 24102A030158
K.AVINASH VARMA 24102A030168
Under The Guidance Of
MR.V.SREETHARAN
Assistant Professor
Department Of Data Science
In the department of Data Science, and submitted to Mohan babu university, Tirupathi in partial
fulfilment of the requirement for the award of the degree of bachelor of technology
in computer science and engineer (data science) during the academic year 2025-26. This work has Benn
carried out under my supervision. The results of this mini project work have not been submitted to any for
the award of any degree.
GUIDE: HEAD:
MR.V.SREETHARAN DR.PRADEEPKUMARGUPTA
Assistant Professor Professor &Head
Dept. Of Data science Dept. of Data science
2|Page
ABSTRACT
A Calendar Application developed using Java Swing is a desktop-based software solution designed
to manage schedules, events, and reminders through an intuitive graphical user interface (GUI). The
application allows users to create, edit, delete, and view events, set reminders, and navigate through
monthly or weekly calendar views. Java Swing, a lightweight GUI toolkit, is utilized to build
responsive and platform-independent interfaces, leveraging components such as JFrame, JPanel,
JTable, and JButton. The application employs object-oriented programming principles and file
handling for persistent storage of event data. This project demonstrates the application of software
engineering concepts, including modular design, event-driven programming, and user interface
development. The implementation addresses challenges such as date-time management, data
persistence, and user interaction, providing a robust and user-friendly tool for personal and
professional scheduling. The project highlights the versatility of Java Swing for building cross-
platform desktop applications and serves as a practical exploration of GUI development.
3|Page
TABLE OF CONTENTS
Title Page No.
ABSTRACT 3
LIST OF FIGURES 4
Chapter 1: INTRODUCTION 6 -7
1.1 Introduction
1.2 History of Java Swing
1.3 Need for Calendar Applications
1.4 Problem Statement
1.5 Scope of Work
Chapter 2: LITERATURE SURVE 8-9
2.1 Introduction
Chapter 4: IMPLEMENTATION 11 - 15
4.1 Development Environment
4.2 Code Structure
4.3 GUI Implementation
4.4 Testing and Validation
Chapter 5: RESULTS AND DISCUSSION 16 -18
CONCLUSION 19
REFERENCES 20
4|Page
LIST OF FIGURES
5|Page
CHAPTER 1: INTRODUCTION
1.1 INTRODUCTION
The Calendar Application developed using Java Swing is a desktop-based software tool designed to assist users in
managing their schedules through a graphical user interface (GUI). The application enables users to create, edit, and
delete events, set reminders, and view their schedules in monthly or weekly formats. Built using Java Swing, a
lightweight and platform-independent GUI toolkit, the application leverages components such as JFrame, JPanel,
JTable, and JButton to provide an intuitive user experience. The project demonstrates key software engineering
principles, including modular design, event-driven programming, and data persistence, making it a practical
exploration of desktop application development.
1. GUI Module: Provides the visual interface for user interaction, including calendar views and dialog boxes for
event management.
2. Event Management Module: Handles the creation, storage, and retrieval of event data, including date, time,
description, and reminders.
3. Data Persistence Module: Ensures events are saved to a file (e.g., JSON or text) for persistence across sessions.
6|Page
Java Swing’s event-driven architecture allows the application to respond dynamically to user inputs, such as button
clicks or menu selections, ensuring a responsive interface. The project serves as an educational tool to understand
GUI development, object-oriented programming, and file handling in Java.
Java Swing, introduced in 1997 as part of the Java Foundation Classes (JFC), is a GUI toolkit built on top of the
Abstract Window Toolkit (AWT). Unlike AWT, which relied on native components, Swing provides lightweight,
platform-independent components implemented entirely in Java. Key milestones include:
1997s: Swing released with JDK 1.2, offering advanced components like JTable, JTree, and JTabbedPane.
2000s: Swing gained popularity for cross-platform desktop applications, competing with Microsoft’s .NET
and Qt.
2010s-Present: While newer frameworks like JavaFX emerged, Swing remains widely used in legacy systems
and educational projects due to its simplicity and robustness.
Swing’s event-driven model and extensive component library make it ideal for applications like the Calendar
Application, where user interaction and visual feedback are critical.
Calendar applications are essential for personal and professional time management:
1. Efficient Schedulin : Allow users to organize tasks, meetings, and events systematically.
3. Cross-Platform Accessibility : Desktop-based applications like this one ensure offline functionality and
compatibility across operating systems.
4. Customization : Enable users to tailor views (e.g., monthly, weekly) and event details to their preferences.
5. Data Persistence : Ensure schedules are retained across sessions, critical for long-term planning.
Unlike web-based or mobile calendar apps, a Java Swing-based desktop application offers offline access, reduced
dependency on internet connectivity, and full control over data storage, making it suitable for educational and
standalone use.
7|Page
Developing a Calendar Application poses several challenges:
1. User Interface Design: Creating an intuitive and responsive GUI that accommodates various user
interactions.
2. Event Management: Ensuring accurate handling of date-time data and conflict detection for
overlapping events.
3. Data Persistence: Implementing reliable storage and retrieval of event data without a database.
4. Cross-Platform Compatibility: Ensuring the application runs consistently on Windows, macOS, and
Linux.
5. Performance: Optimizing the application to handle large numbers of events without lag.
1. Design and development of a Java Swing-based GUI for calendar navigation and event
management.
2. Implementation of event creation, editing, deletion, and reminder functionalities.
3. Persistent storage of event data using file handling.
4. Testing and validation of the application across multiple platforms.
5. Documentation of the software development process and outcomes.
2.1 INTRODUCTION
The development of a Calendar Application requires an understanding of GUI frameworks, event-driven
programming, and data persistence. Java Swing, as a mature GUI toolkit, provides a robust foundation for building
desktop applications. This section reviews key concepts and technologies relevant to the project, including Swing
components, event handling, and file-based storage, drawing from academic and technical resources.
8|Page
Swing’s Model-View-Controller (MVC) architecture separates data (model), presentation (view), and user input
(controller), ensuring modular design. According to Eckel (2006), Swing’s lightweight nature ensures consistent
appearance across platforms, critical for cross-platform applications like this one.
Horstmann and Cornell (2018) highlight that event-driven programming enhances responsiveness by processing user
inputs asynchronously, a critical feature for the Calendar Application’s interactive interface.
The Calendar Application is a Java Swing-based desktop tool comprising three modules:
3. Data Persistence Module: Saves and retrieves event data from files.
9|Page
3.2 GUI DESIGN
1. Main Window: Displays monthly or weekly calendar views using JTable or JPanel grids.
2. Navigation Bar: Buttons or menus to switch between months/weeks.
3. Event Dialog: A JDialog for creating/editing events, with fields for date, time, description, and
reminder settings.
4. Reminder Popups: JOptionPane alerts for upcoming events.
The design prioritizes usability, with clear layouts and intuitive controls, following usability principles by Nielsen
(1994).
1. Event Class: Represents an event with attributes (date, time, description, reminder).
2. Calendar Manager: Handles event creation, editing, deletion, and conflict detection.
3. File Handler: Reads/writes event data to a JSON/text file.
4. Reminder Scheduler: Uses Java’s Timer class to trigger alerts at specified times.
1. Class Diagram: Shows relationships between Event, CalendarManager, FileHandler, and GUI classes.
2. Use Case Diagram: Illustrates user interactions (e.g., add event, view calendar, set reminder).
10 | P a g e
Figure 3.2: UML Class Diagram
CHAPTER 4: IMPLEMENTATION
1. IDE: Eclipse.
2. JDK: Java 17 or later.
3. Libraries: Java Swing (standard library), Jackson (for JSON, optional).
4. Testing Tools: JUnit for unit testing, manual testing for GUI.
1. gui: Contains classes for the main window, calendar views, and dialogs.
2. model: Defines the Event class and related data structures.
11 | P a g e
3. controller: Implements CalendarManager and FileHandler.
4. util: Includes utility classes for date handling and file I/O.
Programming Code:
package calendar;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import java.util.Calendar;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
JFrame frame;
JLabel monthLabel;
JPanel calendarPanel;
Calendar calendar;
public SwingCalendar() {
calendar = Calendar.getInstance();
frame.setSize(400, 400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new BorderLayout());
12 | P a g e
JButton prevButton = new JButton("<");
updateMonthLabel();
prevButton.addActionListener(e -> {
calendar.add(Calendar.MONTH, -1);
updateMonthLabel();
refreshCalendar();
});
nextButton.addActionListener(e -> {
calendar.add(Calendar.MONTH, 1);
updateMonthLabel();
refreshCalendar();
});
topPanel.add(prevButton);
topPanel.add(monthLabel);
topPanel.add(nextButton);
frame.add(topPanel, BorderLayout.NORTH);
// Calendar grid
frame.add(calendarPanel, BorderLayout.CENTER);
refreshCalendar();
frame.setVisible(true);
13 | P a g e
String[] months = {
};
calendarPanel.removeAll();
calendarPanel.add(headerLabel);
temp.set(Calendar.DAY_OF_MONTH, 1);
14 | P a g e
temp.set(Calendar.DAY_OF_MONTH, day);
if (temp.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
dayLabel.setForeground(Color.RED);
calendarPanel.add(dayLabel);
calendarPanel.revalidate();
calendarPanel.repaint();
SwingUtilities.invokeLater(SwingCalendar::new);
Event Dialog: A JDialog with JTextFields for event details and JCheckBox for reminders.
Event Handling: ActionListeners for buttons (e.g., “Add Event”, “Next Month”) and MouseListeners for selecting
dates.
15 | P a g e
Figure 4.2: Event Creation Dialog
GUI Testing: Manual testing to verify navigation, event creation, and reminders.
Cross-Platform Testing: Run the application on Windows and Linux to ensure compatibility.
Setup Description
Environment: Developed on IntelliJ IDEA with JDK 17, tested on Windows 11 and Ubuntu 22.04.
Configuration: Application runs as a standalone JAR file, with event data stored in a JSON file.
Features Tested:
Monthly and weekly calendar views.
16 | P a g e
Reminder popups for upcoming events.
Observed Outcomes
GUI Responsiveness: The interface loads quickly and handles user inputs (e.g., month navigation, event creation)
without lag.
Event Management: Events are accurately stored, retrieved, and displayed, with conflict detection for overlapping
events.
Data Persistence: JSON file reliably stores event data across sessions.
17 | P a g e
Challenges Faced
Date-Time Handling: Parsing and validating date-time inputs required robust error checking.GUI
Layout: Ensuring consistent layouts across screen sizes was challenging, addressed using GridBagLayout.
Data Persistence: JSON parsing errors were mitigated by using the Jackson library.
Performance: Large event lists slowed rendering, optimized by limiting displayed events.
CONCLUSION
The Calendar Application developed using Java Swing represents a robust and user-friendly desktop solution for
personal and professional schedule management. By leveraging Java Swing’s lightweight, platform-independent GUI
toolkit, the application delivers an intuitive interface for creating, editing, and tracking events, with features like
monthly/weekly views, reminders, and file-based data persistence. The project successfully demonstrates key software
engineering principles, including modular design, event-driven programming, and cross-platform compatibility, while
addressing challenges such as date-time handling, GUI optimization, and data integrity.
18 | P a g e
REFERENCES
1. Eckel, B. (2006). Thinking in Java (4th ed.). Prentice Hall.
2. Horstmann, C. S., & Cornell, G. (2018). Core Java Volume I: Fundamentals (10th ed.). Oracle Press.
3. Oracle. (2023). Java Swing Tutorial. Retrieved from https://docs.oracle.com/javase/tutorial/uiswing/
4. Nielsen, J. (1994). Usability Engineering. Morgan Kaufmann.
5. Jackson Library Documentation. Retrieved from https://github.com/FasterXML/jackson
19 | P a g e