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


or $1 if you
register a new account!

Assisting Tutor

Related Homework Solutions

Get help from a qualified tutor
Live Chats