import javax.swing.*;


// modified from JFC Swing Tutorial, pp 632 -3

public class CreateAndShow {
	JFrame frame;
	
	public CreateAndShow() {

		JFrame.setDefaultLookAndFeelDecorated(true);
		
		frame = new JFrame("Example with invokeLater");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		frame.setSize(300, 300);
    	JLabel label = new JLabel("      this is some text--AND THIS IS MORE");
    	frame.add(label);
		
		frame.setVisible(true);
		
	}

	public static void main(String[] args) {
		
		// schedule a job for the event-dispatching thread
		//  creating and showing this GUI.
		
		javax.swing.SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				CreateAndShow gui = (new CreateAndShow());
			}
		});
	
	}
	
}
