0% found this document useful (0 votes)
2 views19 pages

Avinash

The document is a mini project report for a Calendar Application developed using Java Swing, aimed at managing schedules and events through a user-friendly GUI. It outlines the project's objectives, system design, implementation details, and the educational significance of using Java Swing for desktop applications. The application incorporates event management, data persistence, and modular design principles to enhance user experience and functionality.

Uploaded by

saipalavi0080
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views19 pages

Avinash

The document is a mini project report for a Calendar Application developed using Java Swing, aimed at managing schedules and events through a user-friendly GUI. It outlines the project's objectives, system design, implementation details, and the educational significance of using Java Swing for desktop applications. The application incorporates event management, data persistence, and modular design principles to enhance user experience and functionality.

Uploaded by

saipalavi0080
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

CALENDER APPLICATION

A Mini project report submitted to


MOHAN BABU UNIVERSITY
in Partial Fulfilment of the Requirements for The Award of the degree of

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

Department Of Data Science


SCHOOL OF COMPUTING

MOHAN BABU UNIVERSITY


Sree Sainath Nagar, Tirupathi – 517 102, A.P, India
2025-26
1|Page
DEPARTMENT OF DATA SCIENCE
CERTIFICATE
This is to certify that the mini project report entitled
“CALENDER APPLICATION”
Is the Bonafide work done by
V. KISHORE 24102A030136
D.VASANTH KUMAR 24102A030158
K.AVINASH VARMA 24102A030168

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

INTERNAL EXAMINER EXTERNAL EXAMINER

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

2.2 Java Swing Components


2.3 Event-Driven Programming
2.4 Data Persistence in Java
Chapter 3: SYSTEM DESIGN AND ARCHITECTURE 9 - 10
3.1 System Overview
3.2 GUI Design
3.3 Functional Components
3.4 UML Diagrams

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

Figures Description Page No.

Figure 3.1 System Architecture Diagram 9

Figure 3.2 UML Class Diagram 10

Figure 3.3 UML Use Case Diagram 10

Figure 4.1 Main Calendar Interface 15

Figure 4.2 Event Creation Dialog 15

Figure 5.1 Screenshot of Monthly View 17

Figure 5.2 Screenshot of Event Reminder 17

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.

The application consists of three primary components:

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.

1.2 HISTORY OF JAVA SWING

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.

1.3 NEED FOR CALENDAR APPLICATIONS

Calendar applications are essential for personal and professional time management:

1. Efficient Schedulin : Allow users to organize tasks, meetings, and events systematically.

2. Reminders and Alerts : Provide notifications to prevent missed deadlines or appointments.

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.

1.4 PROBLEM STATEMENT

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.5 SCOPE OF WORK

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.

CHAPTER 2: LITERATURE SURVEY

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.

2.2 JAVA SWING COMPONENTS

Java Swing offers a rich set of components for building GUIs:

1. JFrame: The main window container for the application.


2. JPanel: A container for grouping components, used for calendar views.
3. JTable: Displays tabular data, suitable for weekly or daily event views.
4. JButton and JMenu: Enable user interactions like adding or navigating events.
5. JDialog: Provides modal windows for event creation and editing.

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.

2.3 EVENT-DRIVEN PROGRAMMING


Event-driven programming is central to Swing applications. User actions (e.g., button clicks, menu selections) trigger
events, which are handled by listeners. Key concepts include:

1. ActionListener: Handles button clicks and menu actions.


2. MouseListener: Responds to mouse events for interactive calendar navigation.
3. KeyListener: Captures keyboard inputs for shortcuts.

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.

2.4 DATA PERSISTENCE IN JAVA


To retain event data across sessions, the application uses file-based storage (e.g., JSON or text files). Java’s File I/O
classes, such as FileWriter and FileReader, enable reading and writing data. Alternatively, libraries like Jackson can
serialize objects to JSON for structured storage. Oracle’s Java documentation (2023) notes that file-based persistence
is suitable for small-scale applications, avoiding the complexity of databases while ensuring data integrity.

CHAPTER 3: SYSTEM DESIGN AND ARCHITECTURE

3.1 SYSTEM OVERVIEW

The Calendar Application is a Java Swing-based desktop tool comprising three modules:

1. GUI Module: Displays calendar views and event dialogs.

2. Event Management Module: Manages event data and logic.

3. Data Persistence Module: Saves and retrieves event data from files.

Figure 3.1: System Architecture Diagram

9|Page
3.2 GUI DESIGN

The GUI includes:

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).

3.3 FUNCTIONAL COMPONENTS

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.

3.4 UML DIAGRAMS

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

Figure 3.3: UML Use Case Diagram

CHAPTER 4: IMPLEMENTATION

4.1 DEVELOPMENT ENVIRONMENT

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.

4.2 CODE STRUCTURE


The application is organized into packages:

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;

public class SwingCalendar {

JFrame frame;

JLabel monthLabel;

JPanel calendarPanel;

Calendar calendar;

public SwingCalendar() {

calendar = Calendar.getInstance();

frame = new JFrame("Java Swing Calendar");

frame.setSize(400, 400);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.setLayout(new BorderLayout());

// Top panel with buttons and month label

JPanel topPanel = new JPanel();

12 | P a g e
JButton prevButton = new JButton("<");

JButton nextButton = new JButton(">");

monthLabel = new JLabel();

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

calendarPanel = new JPanel(new GridLayout(0, 7)); // 7 days a week

frame.add(calendarPanel, BorderLayout.CENTER);

refreshCalendar();

frame.setVisible(true);

private void updateMonthLabel() {

13 | P a g e
String[] months = {

"January", "February", "March", "April", "May", "June",

"July", "August", "September", "October", "November", "December"

};

int month = calendar.get(Calendar.MONTH);

int year = calendar.get(Calendar.YEAR);

monthLabel.setText(months[month] + " " + year);

private void refreshCalendar() {

calendarPanel.removeAll();

String[] headers = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };

for (int i = 0; i < headers.length; i++) {

JLabel headerLabel = new JLabel(headers[i], SwingConstants.CENTER);

headerLabel.setForeground(i == 0 ? Color.RED : Color.BLACK); // Red for "Sun"

calendarPanel.add(headerLabel);

Calendar temp = (Calendar) calendar.clone();

temp.set(Calendar.DAY_OF_MONTH, 1);

int firstDayOfWeek = temp.get(Calendar.DAY_OF_WEEK); // Sunday=1, Monday=2, ..., Saturday=7

int daysInMonth = temp.getActualMaximum(Calendar.DAY_OF_MONTH);

// Add empty labels before the first day

for (int i = 1; i < firstDayOfWeek; i++) {

calendarPanel.add(new JLabel("")); // empty labels

// Add day labels

for (int day = 1; day <= daysInMonth; day++) {

JLabel dayLabel = new JLabel(String.valueOf(day), SwingConstants.CENTER);

// Check if the day is a Sunday

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();

public static void main(String[] args) {

SwingUtilities.invokeLater(SwingCalendar::new);

4.3 GUI IMPLEMENTATION


Main Window: A JFrame with a JTable for the monthly view, populated dynamically based on the current month.

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.

Figure 4.1: Main Calendar Interface

15 | P a g e
Figure 4.2: Event Creation Dialog

4.4 TESTING AND VALIDATION


Unit Testing: JUnit tests for Event class methods and CalendarManager logic.

GUI Testing: Manual testing to verify navigation, event creation, and reminders.

Cross-Platform Testing: Run the application on Windows and Linux to ensure compatibility.

Chapter 5: RESULTS AND DISCUSSION

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.

Event creation, editing, and deletion.

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.

Reminders: Popups appear as scheduled, using Java’s Timer class.

Data Persistence: JSON file reliably stores event data across sessions.

Verification and Analysis


The monthly view correctly displays dates and events, matching calendar logic.

Event dialogs validate inputs (e.g., date formats) to prevent errors.

Cross-platform tests confirm consistent behavior on Windows and Linux.

Figure 5.1: Screenshot of Monthly View

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

You might also like