Skip to content

rishit-exe/WeatherApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🌤️ Modern Weather App – Java GUI + Weather API

Weather App
API

🚀 Overview

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.


🎨 Features

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


🛠️ Tech Stack

🔹 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


📦 Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/your-username/ModernWeatherApp.git
cd ModernWeatherApp

2️⃣ Get a Free API Key from WeatherAPI

  1. Go to https://www.weatherapi.com/
  2. Sign up and generate a free API key
  3. Copy the key and replace YOUR_WEATHERAPI_KEY in ModernWeatherApp.java:
    private final String API_KEY = "YOUR_WEATHERAPI_KEY";

3️⃣ Install FlatLaf (for UI styling)

  • 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

🚀 Running the Application

javac ModernWeatherApp.java
java ModernWeatherApp

⭐ Star the Repo

If you like this project, don’t forget to ⭐ star the repo!

Your support helps me improve and add more cool features! 🚀🔥

About

Under Development WeatherApp with a user-friendly UI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages