Home - Programming - Java- Simple Gui Window
Simple Gui Window
/**
* Application: Simple Gui Window
* Author: Brian SonniE
* 18/10/09
* www.fluidcoding.com
*/
import javax.swing.*;
public class SimpleGui extends JFrame{
public SimpleGui()
{
// Set the title(Text on top)
setTitle("Simple Gui Window");
// Set The size (Width, Height) of the window.
setSize(400,200);
// Allow the program to close when the Exit Button is clicked.
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Make the Gui Visible.
setVisible(true);
}
public static void main(String[] args) {
// Create an instance of the SimpleGui Class.
SimpleGui Window = new SimpleGui();
}
}
Output