0% found this document useful (0 votes)
8 views

Programming Assignment Unit 8

The Weather Information App, developed using JavaFX and WeatherAPI.com, provides real-time weather data with a user-friendly interface. Key features include a two-day forecast, unit conversion, search history, and dynamic backgrounds based on the time of day. The app is designed to be easily set up in IntelliJ IDEA and includes robust error handling and a visually appealing GUI.

Uploaded by

daud4mk.dk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Programming Assignment Unit 8

The Weather Information App, developed using JavaFX and WeatherAPI.com, provides real-time weather data with a user-friendly interface. Key features include a two-day forecast, unit conversion, search history, and dynamic backgrounds based on the time of day. The app is designed to be easily set up in IntelliJ IDEA and includes robust error handling and a visually appealing GUI.

Uploaded by

daud4mk.dk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Weather Information App

🔧 Project Overview:
This Weather Information App is developed using JavaFX (without Maven) and
WeatherAPI.com for real-time weather data. The application provides a user-friendly interface
for viewing current weather, short-term forecasts, unit conversion, and maintains a search history
with visual weather icons and dynamic backgrounds.
🔍 Key Features:
 Real-time weather data from WeatherAPI.com
 GUI built using JavaFX SDK (no external dependencies)
 Unit toggle between Celsius and Fahrenheit
 Forecast for the next two days
 Weather condition icons for better UX
 Search history with timestamps
 Background changes based on time of day
 Robust error handling
🧠 Technical Explanation of Code:
✅ WeatherApp.java (Main Class)
Purpose: Entry point of the app that initializes the GUI and handles the logic for fetching,
parsing, and displaying weather data.
🛠️Key Components Explained:
 JavaFX GUI Layout: Utilizes VBox, HBox, GridPane, and Scene for organizing layout.
 Event Handling: Uses setOnAction for button click handling.
 HTTP Request: WeatherAPI data is fetched using HttpURLConnection.
 JSON Parsing: Uses org.json to extract data like temperature, condition, icon, and
forecast.
 Unit Toggle Logic: Converts temperature and wind speed between metric and imperial.
 History Tracking: Maintains a list of past queries with timestamps.
 Dynamic Background: Changes background image depending on system time.
📘 README File (as Notepad Text Format)
==========================
Weather Information App
==========================

Developer: Daud Ahmad Khan


Java SDK with JavaFX (No Maven)
Weather API used: weatherapi.com

Instructions:
-------------
1. Open the project in IntelliJ IDEA.
2. Configure JavaFX SDK in Project Structure.
3. Add VM options:
--module-path "C:\path\to\javafx-sdk\lib" --add-modules
javafx.controls,javafx.fxml
4. Run WeatherApp.java

Usage:
------
- Enter any valid city name (e.g., New York, Riyadh).
- Select temperature unit (Celsius/Fahrenheit).
- Click “Get Weather”.
- View current weather, forecast, icon, and history.

API Key Used:


-------------
4b6788ff62c840fca65231132250506

Features:
---------
✔ JavaFX GUI
✔ Real-time Weather
✔ 2-Day Forecast
✔ Temperature Unit Toggle
✔ Weather Icons
✔ Dynamic Background (Day/Night)
✔ Search History
✔ Error Handling
🖼️Screenshots of the App Usage:
Interface:

Search Interface with Celsius Scale:

Search Interface with Fahrenheit Scale


History logging:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy