Question

Weather Reporter Application using DOM or SAX
Using DOM or SAX, load an XML file, parse the data and display the data in a Java GUI Applet.
The Weather Reporting Application is a simple JavaFX GUI app (or can be a web based JSP/JSF application as well) that loads an XML data containing weather data for major cities throughout the world.
The application then parses the data, and places all the cities within a pull down menu.
When a user selects a city, the applet displays the high and low temperature, a short description of the current weather conditions and graphical icon indicating one of the six conditions: sunny, partly sunny, partly cloudy, cloudy rain or snow

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JApplet;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;


/**
*
* @author
*/
public class Weather extends JApplet implements ActionListener{
   
    private JLabel title = new JLabel("The Weather Reporter");
    private Font font1 = new Font("Ảrial", Font.BOLD, 15);
    private Font font2 = new Font("Ảrial", Font.BOLD, 18);
    private Font font3 = new Font("Ảrial", Font.BOLD, 12);
    private Container con = getContentPane();
    private JComboBox<String> selector = new JComboBox<String>();
    private ArrayList<City> cities = null;
    private ImageIcon image = null;
    private City city = null;...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Fort Collins Water Bill Calculator in Java
Homework Solution
$30.00
Computer Science
Java Programming
Bill Calculator
Fort Collins
Gallons
Prices
Volume Charge
Tiers
Calculations
Base Charge
JOptionPane
Decimal Numbers
Statements
Variables
Functions
Directed Graph in Java
Homework Solution
$40.00
Java
Programming
Codes
Algorithms
Graphs
Nodes
Edges
Dept-First-Search
Statements
Variables
Loops
Variables
Input
Output
Java Programming Problems
Homework Solution
$66.00
Computer Science
Java Programming
Interfaces
Counters
Objects
Algorithms
Functions
Adapters
Date
Time
Statements
Loops
Variables
Hierarchy
UML Diagram
Classes
Mechanisms
Java Programming Problems
Homework Solution
$60.00
Java
Programming
Computer Science
Interfaces
Generics
Binary Search Tree
Exception Handling
Balanced Tree
Functions
Integers
Strings
Nodes
Methods
Functions
Sorting
Search
Data Structures
Input
Output
Widget Shop in Java
Homework Solution
$30.00
Computer Science
Java
Widget Shop
Programming
Algorithms
Orders
Costs
Data Structures
Statements
Variables
Conversions
Java Programming Problems
Homework Solution
$13.00
Computer Science
Java Programming
Numbers
Methods
Boolean Type
Input
Output
Multiples
Statements
Variables
Algorithms
Get help from a qualified tutor
Live Chats