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! ππ₯