A professional, single-runnable desktop quiz application built with Java Swing. It features a modern dark-themed user interface, seamless screen transitions via CardLayout, and a built-in scoreboard to track performance across multiple quiz attempts.
- Modern Dark Theme: A sleek, user-friendly interface optimized for readability and high-quality aesthetics.
- Three-Screen Architecture: Seamlessly navigate between the Home, Quiz, and Scoreboard screens using
CardLayout. - Dynamic Quiz Engine: Answer multiple-choice questions with immediate score tracking upon completion.
- Persistent Scoreboard: View past quiz attempts natively within the application, complete with names, scores, and timestamps.
- MVC-Inspired Separation: Clean codebase separating the main frame (
QuizApp) from individual functional panels (HomePanel,QuizPanel,ScoreboardPanel).
Description: The starting screen where players enter their name to begin.
Description: The active quiz screen displaying questions and multiple-choice answers.
Description: The final results screen showing past player performances and timestamps.
- Java Development Kit (JDK) 8 or higher installed on your machine.
- Clone or download this repository to your local machine.
- Navigate to the project directory in your terminal.
- Compile the Java files. Assuming you are in the project root (
c:\Project\Quiz):javac -d bin src/*.java src/panels/*.java
- Run the application:
java -cp bin QuizApp
The application uses a component-based structure to separate concerns:
QuizApp.java: The main entry point. Manages the mainJFrameand handles navigation between panels over aCardLayout. Stores shared state like results.panels/HomePanel.java: The landing screen input form.panels/QuizPanel.java: Handles the quiz logic, question rendering, and score calculation.panels/ScoreboardPanel.java: Renders aJTablecontaining all the historical quiz results.
Aman Kumar Jha
Backend Engineer | Java SpringBoot | Microservices