SK
skumalo0115-commits/flightbooking-Demo
+An easy-to-run Java Swing demo that lets users resolve airline domains to IPs and simulate seat selection in a lightweight desktop UI.
βοΈ Flight Booking Demo
A tiny Java Swing app that simulates a flight booking UI and resolves airline domain IPs. Perfect for demos, classroom exercises, or quick UI experiments. πΊπ
π Short Description
An easy-to-run Java Swing demo that lets users resolve airline domains to IPs and simulate seat selection in a lightweight desktop UI.
π·οΈ Suggested Topics
java swing desktop-app gui demo flight-booking dns networking ui
β¨ Highlights
- π§ Domain to IP resolver using
InetAddress - πͺ Seat selection buttons with confirmation prompts
- π₯οΈ Simple Swing UI (no external dependencies)
- π§© Single-file app (easy to read and extend)
β Prerequisites
- β Java 8+ (JDK installed)
- π§° Command-line tools (
javac,java) in your PATH
Check your Java version:
java -versionπ Run the App
From the project root:
javac src/FlightBookingDemo.java
java -cp src FlightBookingDemoπ§ͺ Optional: Build with Ant
If you prefer Ant and have it installed, you can use the provided build.xml:
antThis will compile the project and generate build outputs per the Ant configuration.
π§βπ» How to Use
- Enter an airline domain (e.g.,
flyair.co.za). - Click Resolve IP to see resolved addresses.
- Choose a seat (1A, 1B, or 1C) and confirm your selection.
βοΈ Configuration Tips
- Domain input: Any valid domain works; try
example.comif you want a quick test. - Seat behavior: Once a seat is confirmed, the button is disabled for that session.
- Networking: Resolution requires internet access or a resolvable local DNS entry.
π§© Main Entry Point
src/FlightBookingDemo.javacontains the Swing UI, event handlers, andmainmethod.
ποΈ Project Structure
.
βββ src/
β βββ FlightBookingDemo.java
βββ build.xml
βββ manifest.mf
π οΈ Troubleshooting
- βCould not resolveβ error: Make sure the domain is valid and you have network access.
- Compilation errors: Confirm youβre using Java 8+ and compiling from the repository root.
- App doesnβt open a window: Ensure youβre running on a machine with a GUI environment.
π Notes
- This app is a demo and stores no data.
- Seat selection disables the chosen seat for the current session.
- The UI is intentionally minimal for learning and extension.
Enjoy flying!