import javax.swing.JFrame;
public class example {
public static void main(String[] args){
JFrame frame = new JFrame();
frame.setSize(100,100);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOES);
frame.setTitle("Example Frame");
frame.setVisible(true);
}
}
JFrame frame = new JFrame("Test Frame");
frame.setSize(500,400);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
public JFrame frame = new JFrame();//creating jframe
Class main(){
public static void main(String[] args){
frame.setSize(200,200); //setting size
frame.setVisable(true); //sets visability
frame.setDefaultCloseOperation.(JFrame.EXIT_ON_CLOSE); //allow jframe to close when clicked
}
}
JFrame myFrame = new JFrame("Frame Title");
There is a typo CLOSE not CLOES :)
JFrame myFrame = new JFrame("Frame Title");