Modern Weather App is a sleek, GUI-based weather application built with Java Swing and styled using FlatLaf for a modern look. It fetches real-time weather data from WeatherAPI and displays temperature, humidity, and conditions with beautiful icons.
✅ Modern UI – Styled with FlatLaf for a professional look
✅ Live Weather Data – Fetches real-time weather using WeatherAPI
✅ Weather Icons – Displays accurate icons based on conditions
✅ Responsive Design – Auto-adjusts for different screen sizes
✅ Error Handling – Displays alerts for invalid city names
🔹 Java – Core logic & API calls
🔹 Swing (JFrame, JPanel, JButton, JLabel, etc.) – GUI Components
🔹 FlatLaf – Modern UI Look & Feel
🔹 WeatherAPI – Real-time weather data
🔹 JSON Parsing – Fetch and display weather conditions
git clone https://github.com/your-username/ModernWeatherApp.git
cd ModernWeatherApp- Go to https://www.weatherapi.com/
- Sign up and generate a free API key
- Copy the key and replace
YOUR_WEATHERAPI_KEYinModernWeatherApp.java:private final String API_KEY = "YOUR_WEATHERAPI_KEY";
- Download FlatLaf JAR from: https://mvnrepository.com/artifact/com.formdev/flatlaf
- Add the JAR to your project:
- IntelliJ:
File > Project Structure > Libraries > Add JAR - VS Code (Command Line):
javac -cp ".;lib/flatlaf-3.2.jar" ModernWeatherApp.java java -cp ".;lib/flatlaf-3.2.jar" ModernWeatherApp
- IntelliJ:
javac ModernWeatherApp.java
java ModernWeatherAppIf you like this project, don’t forget to ⭐ star the repo!
Your support helps me improve and add more cool features! 🚀🔥