import javax.swing.JFrame;

/**
 * Create a window
 *
 */

public class Awindow1
{
    public static void main(String[] args)
    {

        JFrame win = new JFrame("My first Java JFrame window");    //text goes in title bar

        int Xpos   = 150;                 //x distance from right margin
        int Ypos   = 50;                  //y distance from top margin
        int width  = 400;                 //window width
        int height = 200;                 //window height

        win.setBounds(Xpos, Ypos, width, height);           //set window position and size 

        win.setDefaultCloseOperation(win.EXIT_ON_CLOSE);    //action when you press X
    
        win.setVisible(true);                 //make window visible
    }
}