Skip to content

Repository files navigation

Java Practice Hub

Small Java programs and Swing apps — learn by opening, running, and tweaking.

Java Swing   Practice path   Warm amber theme   MIT license



Start with a short example → run it → change one thing → run again.
Then open a Swing mini-game when you want something visual.

Built for self-study · core Java drills · Hangman, Tic Tac Toe, Memory, and more


📘 PDF manual   ·   🌐 OnlineGDB (single files)   ·   📦 GitHub


Hub overview — light   Hub overview — dark

Warm amber practice theme · no green / blue / plum chrome


✨ Why this repo?

Many Java courses jump from System.out.println straight into frameworks.
This hub stays small and runnable: one-file drills first, then short Swing projects you can open in an IDE.

🧩 Core Java first 🖥 Desktop when ready
Variables, input, loops, OOP chapters Hangman, Tic Tac Toe, Memory, SwitchIt…
Run online or with javac / java Practice layouts, listeners, painting
Change one line, learn by feedback See a window respond to your clicks

The goal is comfort with Java — not a production product. Ship small wins often.


🚀 Try it in 60 seconds

  1. Open a file from 01-core-java/examples/source/ in OnlineGDB
  2. Or locally: javac FileName.java && java ClassName
  3. When you want a window, open a project under 02-desktop-projects/ in IntelliJ / Eclipse / NetBeans
  4. Play one round of HangMan or Tic Tac Toe — then read the listener code

A good practice session is 20–30 minutes: one core file → one small Swing change.

HangMan amber-themed practice window


🧩 What’s inside

📖 Core Java track

Short programs for input, arithmetic, Scanner, and chapter-wise drills (CHAP2Chap9).

Practice areas

🎮 HangMan

Guess letters, update the gallows, practice Swing buttons and state. Correct letters use warm amber — not green.

HangMan gameplay

❌⭕ Tic Tac Toe

Two-player board, win highlighting in soft peach, panel layout practice.

🧠 Memory · SwitchIt · Smiley

Card matching, button puzzles, and custom Graphics painting.

🗂 Desktop projects

Project Type How to run
HangMan Swing IDE / NetBeans project
Tic Tac Toe Swing IDE
Memory_Game Swing IDE
ACP -MyGame_SwitchIt Swing IDE
SmileyFrame Swing graphics IDE
Swing2 · MouseE · KeyListen Swing demos IDE
SearchDisplayWordsCount Swing IDE
HasHset · Puzzle · RandomNumbers · … Console javac + java

🎨 Color theme

Desktop apps that used green / blue / yellow system colors for UI chrome now use a warm amber / bronze palette:

Token Hex Use
Bronze #9C6B2F Primary accents
Amber #C4923A Highlights / former blue accents
Success amber #A67C2D Correct guesses (former green)
Soft gold #E0B45C Soft fills / gallows accents
Warm peach #E8B896 Win panels (former pink)
Sand #E8DFD2 / #F3E8D5 Panel backgrounds

Wrong answers still use a warm rust (#B85C38) so feedback stays clear.


🌱 How to practice

✅ Do this 🚫 Skip this
Run the file before reading every line Copy-pasting without compiling
Change one value / condition and re-run Treating Swing apps as “finished products” only
Read the listener that fires on your click Jumping to big frameworks too early
Keep notes of errors you fixed
Read → Compile → Run → Tweak → Re-run → Open a Swing app

🛠️ For developers

Java Swing NetBeans

Folder map

Path Purpose
01-core-java/ Core learning track
01-core-java/examples/source/ Single-file practice
01-core-java/examples/extracted-archives/ Archived extracts
02-desktop-projects/ Swing / console mini-projects
docs/ Screenshots + PDF / HTML manual
.github/workflows/ CI compile checks

Local terminal

javac FileName.java
java ClassName

Regenerate screenshots & PDF

node scripts/docs/capture-screenshots.mjs
node scripts/docs/build-manual.mjs

Requires Node.js. Screenshots use Playwright + system Chrome.

More docs

📘
PDF user manual Links + screenshots
HTML manual Same content in the browser

License

MIT — see LICENSE.

Author

Baheesa Fatima — shared as a Java learning resource for practice and self-study.

About

Learn Java with curated examples, OOP exercises, and desktop Swing projects from coursework.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages