Skip to content

ykwise/java-ExpenseTracker-JavaFX-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaFX Expense Tracker

A full-stack, data-driven desktop application for managing personal expenses. This application allows users to track their spending with full CRUD (Create, Read, Update, Delete) functionality, visualize monthly summaries with a pie chart, and export data to a CSV file.

Expense Tracker Main Window

Features & Screenshots

Main Dashboard & Analytics

Main Window Screenshot View all expenses, sorted by date. A dynamic pie chart (using JFreeChart) provides a visual summary of monthly spending by category.

Add & Edit Expenses

Add/Edit Screenshot A single, reusable form is used for both adding new expenses and editing existing ones. The form is launched as a modal dialog, and the category dropdown is dynamically populated from the database.

Delete Confirmation

Delete Screenshot A confirmation dialog, which includes the details of the selected item, appears before any destructive action to prevent accidental data loss.

Export to CSV

Export Screenshot Export all expense data to a .csv file with a single click. A native file-save dialog allows the user to choose where to save the file.


Technology Stack

  • Language: Java (JDK 17)
  • Build Tool: Apache Maven
  • User Interface (UI): JavaFX (with FXML)
  • Database: SQLite (via JDBC)
  • Charting Library: JFreeChart

Architecture

This project is built using the Model-View-Controller (MVC) design pattern to ensure a clean separation of concerns:

  • Model: The Expense.java class represents the data structure.
  • View: The MainView.fxml and AddExpenseView.fxml files define the UI layout.
  • Controller: The MainViewController and AddExpenseController classes handle all user input and application logic.
  • Data Layer: The DatabaseManager.java class encapsulates all JDBC connections and SQL queries, abstracting the database from the rest of the application.

How to Run

Prerequisites

Running the Application

  1. Clone the repository (or download the source code):

    git clone [https://github.com/ykwise/java-ExpenseTracker-JavaFX-project.git](https://github.com/ykwise/java-ExpenseTracker-JavaFX-project.git)
    cd java-ExpenseTracker-JavaFX-project
  2. Compile and Run using the JavaFX Maven Plugin: This project is configured to run using the javafx-maven-plugin. The following command will compile the project and launch the application:

    mvn clean javafx:run

The application will launch, and the expenses.db SQLite database file will be automatically created in the project's root directory if it doesn't already exist.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages