Consider the following application files:

/JavaCS1/src/guiprojectcity2/DisplayWindow.java
import java.awt.*;
import javax.swing.*;
public class DisplayWindow extends JFrame{

private Container c;

public DisplayWindow(){
super("Display");
c = this.getContentPane();
}

public void addPanel(JPanel p){
c.add(p);
}

public void showFrame(){
this.pack();
this.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

/JavaCS1/src/guiprojectcity2/CityTester.java

public class CityTester {
public static void main(String[] args){
DisplayWindow display = new DisplayWindow();
CityPanel p = new CityPanel();
display.addPanel(p);
display.showFrame();
}
}

For this assignment you are to create a graphical program that, with user interaction, visually simulates the path of the sun over a city skyline.

Your job for this assignment is to duplicate this behavior with your own graphical application, complete with "time" labels beneath each sun position. Your application should include two classes, a CityTester driver class, given above, and a CityPanel class, which you must write in its entirety and submit below. The class you submit must be named CityPanel, and your submission should include not only the class text, but also all of the necessary import statements to make the class function properly.

Finally, the "skyline" we show in the running version,above, displays just two buildings, and is pathetic. The skyline in your version should be more ambitious, and should include at least four buildings, maybe a planetarium, perhaps a crane, whatever.

Your task, then, is to write the CityPanel class.
Enter the code for your CityPanel class in the box below.