Simple GUI Program in Java

 import javax.swing.*;   
 public class simpleGui  
 {  
      public static void main(String [] args)  
           {  
                          JFrame frame = new JFrame();   
                          JButton button= new JButton("clickeme");   
                          //frame.setDefaultCloseOperation(JFrame.EXIT_NO_CLOSE);  
                          frame.getContentPane().add(button);   
                          frame.setSize(300,300);   
                          frame.setVisible(true);   
           }  
 }  

Post a Comment

0 Comments