Task Tracker (Java Swing)

Created by Glabay | Added on Jun 05, 2026
0 reviews

Overview

Welcome to your next Java Swing project!

Your task is to build a desktop Task Tracker application that allows users to create, view, edit, and delete tasks.

Tasks should be displayed in a list on the left side of the application. When a task is selected, its details should appear on the right side where the user can view and edit the task.

All tasks must be loaded from and saved to a JSON file, allowing data to persist between application launches.

This project is designed to introduce you to:

  • CRUD Operations (Create, Read, Update, Delete)
  • Collections/Lists
  • UUIDs
  • Enums
  • JSON Serialization
  • Separation of Concerns
  • More Advanced Swing Components
  • Application Architecture

Learning Objectives

By completing this project, you should be able to:

  • Create a multi-panel Swing application
  • Use a JList to display data
  • Load and save JSON files
  • Generate UUIDs
  • Use Enums
  • Manage collections of objects
  • Create reusable classes
  • Separate UI, business logic, and persistence logic
  • Build a real-world business application

Functional Requirements

Task Management

The application must support:

  • Creating tasks
  • Viewing tasks
  • Editing tasks
  • Deleting tasks
  • Completing a task

Changes should persist between launches.

Task Model

Each task should contain:

UUID id;
String title;
String description;
TaskStatus status;
LocalDate createdAt;

The ID should be automatically generated when a task is created.

Task Status

Create an Enum representing task status.

public enum TaskStatus {
    TODO,
    IN_PROGRESS,
    COMPLETED
}

Users should be able to change the status of a task.

Task Creation

When creating a task:

  • Generate a UUID
  • Set the creation date
  • Save the task immediately

The task should automatically appear in the task list.

Task Editing

Users should be able to:

  • Change title
  • Change description
  • Change status

Changes should only be saved when the user clicks the Save button.

Task Deletion

Users should be able to remove tasks.

Deleting a task should remove it from:

  • The UI
  • The JSON file

JSON Persistence

Tasks must be stored in a JSON file.

[
  {
    "id": "d75e95f8-7c65-4b06-8f8d-c2c9f1f3cb9d",
    "title": "Learn Swing",
    "description": "Build first Swing application",
    "status": "IN_PROGRESS",
    "createdAt": "2026-06-01"
  }
]

The application should:

  • Load tasks on startup
  • Save tasks when changes occur

User Interface Requirements

The application should contain a menu bar, task list, and task details panel.

Example Layout

+-----------------------------------------------------+
| File  Tasks  Help                                   |
+-----------------------------------------------------+
| Tasks                | Task Details                 |
|----------------------|------------------------------|
| Learn Swing          | Title:                       |
| Learn JSON           | [____________________]       |
| Build Portfolio      |                              |
|                      | Status:                      |
|                      | [TODO ▼]                     |
|                      |                              |
|                      | Description:                 |
|                      | [______________________]     |
|                      | [______________________]     |
|                      | [______________________]     |
|                      |                              |
|                      | UUID:                        |
|                      | d75e95f8-...                 |
|                      |                              |
|                      | [Save] [Delete]              |
+-----------------------------------------------------+
| [New Task]                                          |
+-----------------------------------------------------+

Required Swing Components

Research and use the following components:

  • JFrame
  • JMenuBar
  • JSplitPane
  • JList
  • JScrollPane
  • JTextField
  • JTextArea
  • JComboBox
  • JButton
  • JPanel

Technical Requirements

Requirement 1: UUID

Each task must have a unique identifier.

UUID.randomUUID();

Research:

  • What is a UUID?
  • Why are UUIDs useful?

Requirement 2: Collections

Store tasks in a collection.

List<Task> tasks = new ArrayList<>();

Research:

  • List
  • ArrayList

Requirement 3: Multiple Classes

Do not place everything inside one class. Suggested structure:

Application.java

model/
├── Task.java
├── TaskStatus.java

service/
├── TaskService.java

repository/
├── TaskRepository.java

ui/
├── MainFrame.java
├── TaskListPanel.java
├── TaskDetailsPanel.java

You may organize differently if you can justify your design.

Requirement 4: Separation of Concerns

Separate responsibilities.

UI Layer

Responsible for:

  • Windows
  • Buttons
  • Text Fields
  • User Interaction

Service Layer

Responsible for:

  • Task Creation
  • Task Updates
  • Task Deletion

Repository Layer

Responsible for:

  • Reading JSON
  • Writing JSON

Bonus Challenges

Bronze Challenges

Statistics Panel

Display:

Total Tasks: 15
Todo: 5
In Progress: 4
Completed: 6

Search Tasks

Add a search field.

Users should be able to filter tasks by title.

Delete Confirmation

Before deleting a task:

Are you sure you want to delete this task?

Use JOptionPane.


Silver Challenges

Dark Theme

Create a dark mode version of your application.

Keyboard Shortcuts

CTRL + S -> Save the selected task
DELETE -> Delete the selected task

Sorting

Allow tasks to be sorted by:

  • Name
  • Creation Date
  • Status

Gold Challenges

Menu Bar Features

File
├── New Task
├── Save
├── Exit

Help
├── About

Import / Export JSON

Allow users to:

  • Import tasks
  • Export tasks

Recently Modified Date

LocalDateTime modifiedAt;

Track when tasks change.


Platinum Challenges

JDBC + SQLite

Replace JSON persistence with SQLite. Requirements:

  • Create a tasks database
  • Create a tasks table
  • Use JDBC
  • Load tasks from SQLite
  • Save tasks to SQLite

Multiple Task Lists

Support:

Personal
Work
School

Each list contains its own tasks.

Kanban Board

Replace the task list with:

TODO
IN_PROGRESS
COMPLETED

Allow tasks to move between columns.