QuestionQuestion

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 PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use 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;...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

50% discount

Hours
Minutes
Seconds
$105.00 $52.50
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats