import java.awt.*;
import javax.swing.JFrame;

/**	Author: David D. Riley
 *		Date: Jan, 2005
 *   Creating Labels (Figure 3.12)
 */
public class Driver  {
	private JFrame  window;
	private Label cityEngland, cityFrance, cityJapan, cityUSA;
    
	public Driver()  {
		window = new JFrame( "Cities of the World" );	
		window.setBounds(50, 50, 400, 300);
		window.setLayout(null);
		window.setBackground(Color.white);
		window.setVisible(true);

		cityEngland = new Label( "London" );
		cityEngland.setBounds(100, 200, 120, 20);
		cityEngland.setForeground(Color.green);
		window.add(cityEngland,0);
		cityEngland.repaint();
        
		cityFrance = new Label ( "Paris" );
		cityFrance.setBounds(250, 30, 100, 20);
		cityFrance.setForeground(Color.blue);
		window.add(cityFrance,0);
		cityFrance.repaint();
        
		cityJapan = new Label ( "Tokyo" );
		cityJapan.setBounds(30, 75, 100, 20);
		cityJapan.setForeground(Color.red);
		window.add(cityJapan,0);
		cityJapan.repaint();
        
		cityUSA = new Label ( "New York City" );
		cityUSA.setBounds(225, 250, 150, 20);
		cityUSA.setForeground(Color.white);
		cityUSA.setBackground(Color.blue);
		window.add(cityUSA,0);
		cityUSA.repaint();
		window.repaint();
	}
}
