An interactive Java Swing application that displays real-time clocks for different time zones around the world. Simply hover your mouse over different regions on the world map to see the current time and date for that location.
-
Interactive World Map: Hover over different countries to see their local time
-
Real-time Updates: Time and date update dynamically as you move your mouse
-
Multiple Time Zones: Currently supports:
- 🇦🇺 Australia (Sydney)
- 🇨🇦 Canada (Chicago timezone)
- 🌐 System Default (your local timezone)
-
Clean UI: Simple and intuitive graphical interface
-
Responsive Design: 1000x700 pixel window with fixed dimensions
- Java Development Kit (JDK) 8 or higher
- A world map image file named
World1.jpg
-
Clone the repository
git clone https://github.com/yourusername/world-clock.git cd world-clock -
Add the world map image
- Place your world map image in the project directory
- Ensure it's named
World1.jpg
-
Compile the Java file
javac WorldClock.java
-
Run the application
java WorldClock
- Launch the application - A window will open displaying the world map
- Hover over regions - Move your mouse over different areas of the map
- View time zones - The header will display the current time zone, time, and date
- Explore different regions - Currently supports Australia and Canada regions
| Region | Coordinates | Time Zone |
|---|---|---|
| Australia | (800-900, 520-580) | Australia/Sydney |
| Canada | (100-270, 180-310) | America/Chicago |
| Other areas | - | System Default |
- Language: Java
- GUI Framework: Swing
- Time Handling: Java Time API (LocalDate, LocalTime, ZoneId)
- Event Handling: MouseMotionListener for interactive hover effects
- Image Loading: ImageIcon for map display
world-clock/
├── WorldClock.java # Main application file
├── World1.jpg # World map image (required)
└── README.md # This file
- Add more countries and time zones
- Implement click-to-pin functionality
- Add digital clock display options
- Include country flags and names
- Add time zone conversion features
- Implement different map projections
- Add keyboard shortcuts
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Add more time zones and countries
- Improve the UI/UX design
- Add unit tests
- Optimize coordinate detection
- Add configuration files for easy customization
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: Hari06om
- Thanks to the Java community for excellent documentation
- World map image source: [Add your source here]
- Inspiration from various world clock applications
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue if your problem isn't already reported
- Provide detailed information about your system and the issue
⭐ Star this repository if you found it helpful! ⭐