A comprehensive Java Swing-based desktop application for tracking personal expenses with visual analytics and budget management capabilities.
- Add, Edit, and Delete Expenses - Manage your expenses with an intuitive interface
- Expense Categorization - Organize expenses by custom categories
- Date-Based Filtering - Filter expenses by specific dates using an interactive date picker
- Persistent Storage - All data is saved automatically using JSON format
- Monthly Budget Management - Set and track your monthly spending limits
- Pie Chart Visualization - Visual breakdown of expenses by category with color-coded legend
- Category Totals - Automatic calculation of spending per category
- Expense Insights - Identifies your highest spending category
- Real-Time Updates - Charts update automatically as you add or modify expenses
- Budget vs. Spending - Track remaining budget in real-time
- Visual Indicators - Color-coded remaining balance (green for positive, red for overspending)
- Low Balance Warnings - Automatic alerts when remaining budget falls below ₱500
- Budget Validation - Prevents setting budgets lower than existing expenses
- Java SE 8 or higher
- Gson Library (com.google.gson) - For JSON serialization/deserialization
- Download from Maven Repository
- Or add via Maven:
com.google.code.gson:gson:2.10.1
- Windows, macOS, or Linux with Java Runtime Environment (JRE)
- Minimum 512 MB RAM
- Screen resolution: 1280x720 or higher recommended
-
Clone or download the project files
git clone <repository-url> cd expense-tracker
-
Add Gson library to your project
- Download the Gson JAR file
- Add it to your project's classpath
- If using an IDE (Eclipse/IntelliJ), add it as an external library
-
Compile the project
javac -cp .:gson-2.10.1.jar Main.java Expense.java
-
Run the application
java -cp .:gson-2.10.1.jar Main
- Click the "Add Your Budget" button in the top-left section
- Enter your monthly budget amount
- Click "Save Budget"
- Your budget will be displayed in the top-right corner along with remaining balance
- Click "Add / Edit Expense" button
- Fill in the expense details:
- Description: What you spent on (e.g., "Grocery shopping")
- Amount: Cost in pesos (e.g., "1500")
- Category: Type of expense (e.g., "Food", "Transport", "Entertainment")
- Click "Add Expense"
- Select a row in the expense table
- Click "Add / Edit Expense" button
- Click "Edit Expense" in the dialog
- Modify the details as needed
- Click "Update Expense"
- Select a row in the expense table
- Click "Add / Edit Expense" button
- Click "Delete Expense"
- Confirm the deletion
- Use the date picker in the top-right corner to select a specific date
- The table and pie chart will automatically update to show only expenses from that date
- The pie chart displays automatically below the expense table
- Shows percentage breakdown of spending by category
- Includes a legend with exact amounts per category
- Displays your highest spending category
The application stores data locally in JSON format:
- expenses.json - Contains all expense records
- budget.json - Stores your monthly budget setting
These files are created automatically in the application's directory and persist between sessions.
expense-tracker/
├── Main.java # Main application class with GUI
├── Expense.java # Expense data model class
├── expenses.json # Auto-generated expense data
├── budget.json # Auto-generated budget data
└── README.md # This file
The main application class containing:
- GUI components and layout management
- Event handlers for user interactions
- Data persistence methods (save/load)
- Budget tracking logic
PieChartPanel- Inner class for rendering the expense analytics chart
Data model class representing a single expense with:
- Description
- Amount
- Category
- Date
- Primary Background: Light Blue (#ADD8E6)
- Panel Background: Light Blue Gradient (#C8E6FA)
- Add Button: Blue (#007ACC)
- Edit Button: Orange (#FFA500)
- Delete Button: Crimson (#DC143C)
- Budget Button: Green (#228B22)
-
Consistent Categories - Use the same category names for better analytics (e.g., always use "Food" instead of mixing "Food", "Groceries", "Eating")
-
Regular Updates - Add expenses daily for accurate budget tracking
-
Budget Planning - Set realistic budgets based on your income and essential expenses
-
Review Analytics - Regularly check the pie chart to identify spending patterns
-
Backup Data - Periodically backup your
expenses.jsonandbudget.jsonfiles
Issue: Application won't start
- Solution: Ensure Java is properly installed and Gson library is in the classpath
Issue: Data not saving
- Solution: Check file permissions in the application directory
Issue: Budget warning appears repeatedly
- Solution: This is intentional when balance is below ₱500. Increase budget or reduce expenses
Issue: Pie chart not displaying
- Solution: Add at least one expense to generate the chart
Potential features for future versions:
- Export data to CSV/Excel
- Monthly/yearly expense reports
- Multiple budget categories
- Recurring expense templates
- Dark mode theme
- Cloud sync capabilities
- Mobile companion app
This project is open-source and available for educational purposes.
For issues, questions, or contributions, please open an issue in the project repository.
Version: 1.0
Last Updated: December 2025
Author: Teleron, Jamero, Monencillo, Ragutero
Troubleshooting Issue: Application won't start
Solution: Ensure Java is properly installed and Gson library is in the classpath
Issue: Data not saving
Solution: Check file permissions in the application directory
Issue: Budget warning appears repeatedly
Solution: This is intentional when balance is below ₱500. Increase budget or reduce expenses
Issue: Pie chart not displaying
Solution: Add at least one expense to generate the chart# Expense Tracker with Analytics
A comprehensive Java Swing-based desktop application for tracking personal expenses with visual analytics and budget management capabilities.
- Add, Edit, and Delete Expenses - Manage your expenses with an intuitive interface
- Expense Categorization - Organize expenses by custom categories
- Date-Based Filtering - Filter expenses by specific dates using an interactive date picker
- Persistent Storage - All data is saved automatically using JSON format
- Monthly Budget Management - Set and track your monthly spending limits
- Pie Chart Visualization - Visual breakdown of expenses by category with color-coded legend
- Category Totals - Automatic calculation of spending per category
- Expense Insights - Identifies your highest spending category
- Real-Time Updates - Charts update automatically as you add or modify expenses
- Budget vs. Spending - Track remaining budget in real-time
- Visual Indicators - Color-coded remaining balance (green for positive, red for overspending)
- Low Balance Warnings - Automatic alerts when remaining budget falls below ₱500
- Budget Validation - Prevents setting budgets lower than existing expenses
- Java SE 8 or higher
- Gson Library (com.google.gson) - For JSON serialization/deserialization
- Download from Maven Repository
- Or add via Maven:
com.google.code.gson:gson:2.10.1
- Windows, macOS, or Linux with Java Runtime Environment (JRE)
- Minimum 512 MB RAM
- Screen resolution: 1280x720 or higher recommended
-
Clone or download the project files
git clone <repository-url> cd expense-tracker
-
Add Gson library to your project
- Download the Gson JAR file
- Add it to your project's classpath
- If using an IDE (Eclipse/IntelliJ), add it as an external library
-
Compile the project
javac -cp .:gson-2.10.1.jar Main.java Expense.java
-
Run the application
java -cp .:gson-2.10.1.jar Main
- Click the "Add Your Budget" button in the top-left section
- Enter your monthly budget amount
- Click "Save Budget"
- Your budget will be displayed in the top-right corner along with remaining balance
- Click "Add / Edit Expense" button
- Fill in the expense details:
- Description: What you spent on (e.g., "Grocery shopping")
- Amount: Cost in pesos (e.g., "1500")
- Category: Type of expense (e.g., "Food", "Transport", "Entertainment")
- Click "Add Expense"
- Select a row in the expense table
- Click "Add / Edit Expense" button
- Click "Edit Expense" in the dialog
- Modify the details as needed
- Click "Update Expense"
- Select a row in the expense table
- Click "Add / Edit Expense" button
- Click "Delete Expense"
- Confirm the deletion
- Use the date picker in the top-right corner to select a specific date
- The table and pie chart will automatically update to show only expenses from that date
- The pie chart displays automatically below the expense table
- Shows percentage breakdown of spending by category
- Includes a legend with exact amounts per category
- Displays your highest spending category
The application stores data locally in JSON format:
- expenses.json - Contains all expense records
- budget.json - Stores your monthly budget setting
These files are created automatically in the application's directory and persist between sessions.
expense-tracker/
├── Main.java # Main application class with GUI
├── Expense.java # Expense data model class
├── expenses.json # Auto-generated expense data
├── budget.json # Auto-generated budget data
└── README.md # This file
The main application class containing:
- GUI components and layout management
- Event handlers for user interactions
- Data persistence methods (save/load)
- Budget tracking logic
PieChartPanel- Inner class for rendering the expense analytics chart
Data model class representing a single expense with:
- Description
- Amount
- Category
- Date
- Primary Background: Light Blue (#ADD8E6)
- Panel Background: Light Blue Gradient (#C8E6FA)
- Add Button: Blue (#007ACC)
- Edit Button: Orange (#FFA500)
- Delete Button: Crimson (#DC143C)
- Budget Button: Green (#228B22)
-
Consistent Categories - Use the same category names for better analytics (e.g., always use "Food" instead of mixing "Food", "Groceries", "Eating")
-
Regular Updates - Add expenses daily for accurate budget tracking
-
Budget Planning - Set realistic budgets based on your income and essential expenses
-
Review Analytics - Regularly check the pie chart to identify spending patterns
-
Backup Data - Periodically backup your
expenses.jsonandbudget.jsonfiles
Issue: Application won't start
- Solution: Ensure Java is properly installed and Gson library is in the classpath
Issue: Data not saving
- Solution: Check file permissions in the application directory
Issue: Budget warning appears repeatedly
- Solution: This is intentional when balance is below ₱500. Increase budget or reduce expenses
Issue: Pie chart not displaying
- Solution: Add at least one expense to generate the chart
Potential features for future versions:
- Export data to CSV/Excel
- Monthly/yearly expense reports
- Multiple budget categories
- Recurring expense templates
- Dark mode theme
- Cloud sync capabilities
- Mobile companion app
This project is open-source and available for educational purposes.
For issues, questions, or contributions, please open an issue in the project repository.
Version: 1.0
Last Updated: December 2025
Author: Expense Tracker Team