A Java Swing application for tracking and visualizing personal expenses.
- Add Expenses: Enter expense details including amount, description, category, and date
- Multiple Views:
- Summary View: Get a clear overview of your spending patterns with percentages
- Detailed View: See all your expenses in a tabular format
- Chart View: Visualize expense distribution with an interactive pie chart
- Expense Management:
- Filter expenses by category
- Delete unwanted expenses
- Automatic sorting by date (newest first)
- Data Persistence: All expense data is automatically saved to a file
- Export Functionality: Export summaries to text files for record-keeping
- Java Runtime Environment (JRE) 8 or higher
- Swing (included in standard Java installation)
- Download the Expense Tracker JAR file from the releases section
- Ensure you have Java installed on your system
- Run the application using:
java -jar ExpenseTracker.jar
- Enter the expense amount in the "Amount" field
- Choose or type a category in the "Category" dropdown
- Provide a description (optional)
- Select the date of the expense using the date chooser
- Click "Add Expense" to record it
- Use "Clear Fields" to reset the form
Navigate between different views using the tabs:
- Summary: Shows total expenses by category with percentages
- Detailed View: Displays all expenses in a sortable table
- Charts: Visualizes expense distribution in a pie chart
- Delete: Select an expense in the detailed view and click "Delete Selected"
- Filter: Click "Filter By Category" to view expenses from a specific category
- Export: Click "Export Summary" to save your expense summary as a text file
The application automatically saves your expenses to a file named expenses.txt
in the application directory. This file is loaded each time you start the application and updated when you close it.
To build the application from source:
- Clone the repository:
git clone https://github.com/username/expense-tracker.git
- Open the project in your Java IDE (Eclipse, IntelliJ IDEA, etc.)
- Build the project using your IDE's build command or with:
javac ExpenseTracker.java
- Run the compiled application:
java ExpenseTracker
You can customize the application by:
- Modifying the categories in the
categories
array - Changing the currency symbol (currently ₹) in the formatter strings
- Adjusting the UI colors in the chart generation code
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Java Swing for the user interface
- Uses simple file I/O for data persistence
- Custom chart rendering for expense visualization