To-Do List
This To-Do List application stores tasks across categorized lists, persists the full object graph to a JSON file using the **org.json** library, and displays real-time completion percentages via **DecimalFormat**. The JavaFX interface uses a **ScrollPane** wrapping a **VBox** so the list grows dynamically without layout changes.
Dynamic Main View Architecture
The main view is constructed programmatically in the start method. A ScrollPane wraps the VBox that holds task list entries, with setFitToWidth(true) keeping items full-width and setVbarPolicy(NEVER) removing the scrollbar chrome. Popups for creating and deleting lists are launched as separate Stage instances, keeping the main window logic clean.
JSON-Based Persistence Layer
The save system serializes the full ToDoList object graph, including task names, statuses, and categories, to a JSON array using org.json. Each ToDoList implements a toJSON() method that returns a JSONObject, and a static fromJSON() factory for deserialization. The file is written with 2-space indentation so it is human-readable and easy to inspect directly.
Task Management and Sorting Logic
The ToDoList class tracks completed tasks in a separate list and uses DecimalFormat to format the completion ratio as a percentage with one decimal place. Sorting is delegated to a SortTasks helper that accepts the active sortingOptions value and returns a reordered display list, keeping the sort strategy decoupled from the data model.
Technical Implementation Summary
Combining JavaFX for the presentation layer with the org.json persistence engine produced a functional desktop tool. The main areas explored were Model-View separation, managing complex Java data structures across serialization boundaries, and keeping the UI synchronized with the underlying task state on every user action.
Try It Out
DownloadIf you want to try this app out for yourself, click on the download button and install from GitHub.
Video Demonstration
External Media Required
This video requires third-party cookies from YouTube to be displayed. Accepting will enable all external media across the site.