import java.awt.*; 
import javax.swing.*; 

public class TestWindow {    
	private static void newWindow() {       
	//Create and set up the window.       
	JFrame frame = new JFrame("Simple GUI");       
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);   
    
	JLabel textLabel = new JLabel("Test Label in Window",SwingConstants.CENTER);       
	textLabel.setPreferredSize(new Dimension(200, 100));       
	frame.getContentPane().add(textLabel, BorderLayout.CENTER);       
	//Display the window.       
	frame.setLocationRelativeTo(null);       
	frame.pack();       
	frame.setVisible(true);
    }    
	public static void main(String[] args) {       
		newWindow();    
	} 
}