import java.applet.Applet; import java.awt.*; // This appears in Core Web Programming from // Prentice Hall Publishers, and may be freely used // or adapted. 1997 Marty Hall, hall@apl.jhu.edu. public class WeatherPanel extends Panel { protected String city, weather; protected String[] weathers = {"rainy", "cloudy", "partly-cloudy", "sunny"}; protected int iconWidth = 456, iconHeight=456; private Applet app; private Image[] icons = new Image[weathers.length]; private Label cityLabel = new Label(); public WeatherPanel(String city, String weather, Applet app) { setCity(city); setWeather(weather); setApplet(app); for(int i=0; i