Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GUI-based voting application built using Java Swing that enables admin-controlled candidate and voter management. Features include encrypted login, dynamic vote casting, CSV export, and an intuitive dashboard for result visualization. βœ… Designed for semester submission | πŸ”’ Secure Authentication | πŸ’Ύ Data Persistence with TXT/CSV

License

Notifications You must be signed in to change notification settings

UsamaMatrix/VotingApp-JAVA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

πŸ—³οΈ Voting System - Java Swing Desktop Application

Java GUI Status License


Coding in action

A secure, file-based desktop voting system built with Java Swing, featuring user authentication, admin control, and vote tracking β€” ideal for academic projects and prototype demonstrations.


πŸ“Œ Core Features

πŸ‘₯ Voter Interface

  • πŸ” Secure Login (SHA‐256 hashing)
  • πŸ—³οΈ One‐Vote Guarantee (no double voting)
  • 🎨 Polished UI with candidate images, names & symbols
  • πŸ“Š Real‐time Vote Tally Display

πŸ› οΈ Admin Panel

  • πŸ”‘ Login with default credentials
  • πŸ“ˆ View counts: voters, candidates, votes
  • βž• Add / πŸ—‘οΈ Delete voters & candidates
  • πŸ“€ Export data (CSV)
  • πŸ”„ Intuitive sidebar + tab layout

πŸ’Ύ Local Data Persistence

Stored in .txt files for portability:

  • candidates.txt β†’ names, votes, symbols
  • voters.txt β†’ usernames + hashed passwords
  • voted.txt β†’ recorded voters

πŸ—‚οΈ Project Structure


VotingSystem/
β”œβ”€β”€ src/votingapp/
β”‚ β”œβ”€β”€ AdminPanel.java
β”‚ β”œβ”€β”€ VotingPanel.java
β”‚ β”œβ”€β”€ LoginFrame.java
β”‚ β”œβ”€β”€ VotingSystemApp.java
β”‚ β”œβ”€β”€ DataStore.java
β”‚ └── SecurityUtils.java
β”œβ”€β”€ candidates.txt
β”œβ”€β”€ voters.txt
β”œβ”€β”€ voted.txt
└── src/images/
β”œβ”€β”€ icon.png
β”œβ”€β”€ vote.png
β”œβ”€β”€ dashboard.png
β”œβ”€β”€ candidates.png
β”œβ”€β”€ voters.png
β”œβ”€β”€ results.png
└── \[candidate-symbols].png

πŸ” Admin Credentials (Default)


Username: admin
Password: admin123

⚠️ Please update before real-world use.


▢️ How to Run

🧾 Terminal

cd src
javac votingapp/*.java
java votingapp.VotingSystemApp

πŸ’» IntelliJ / Eclipse

  1. Import as Java project
  2. Mark src as source root
  3. Run VotingSystemApp.java

πŸ“€ CSV Export Output

Filename Contents
candidates.csv Candidate name, votes, symbol
voters.csv Username, hashed password
votedusers.csv List of users who voted

Compatible with Excel & Sheets.


πŸ§ͺ Sample Data

candidates.txt

Abrar,0,brain
John,0,star

voters.txt

alice,ef92b778ba...
bob,5e88489da4...

voted.txt

alice

πŸ’Ό Tech Stack

  • Java SE 17+
  • Swing (GUI)
  • File I/O
  • SHA‐256 hashing
  • PrintWriter (CSV export)

πŸ“Έ Screenshots (Recommended)

(Add images of login, voting, and admin panels for visual impact.)


πŸ“Ž Notes

  • Place symbol images in /src/images/, e.g. brain.png, star.png
  • Fully offline and portable
  • Future-ready: can add DB, charts, PDF export

πŸ§‘β€πŸŽ“ Use Cases

  • Academic semester projects
  • Demo prototypes for offline voting
  • Java GUI programming learning tool

πŸ“œ License

This is for educational/demo purposes. Modify and share with proper credit.


Built professionally, coded confidently. β˜•πŸ’»

About

GUI-based voting application built using Java Swing that enables admin-controlled candidate and voter management. Features include encrypted login, dynamic vote casting, CSV export, and an intuitive dashboard for result visualization. βœ… Designed for semester submission | πŸ”’ Secure Authentication | πŸ’Ύ Data Persistence with TXT/CSV

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /