Saturday, 24 September 2016

set startup jframe1 or form1 as start in main method











Jframe frame = new Jframe();
frame.setVisible(true);


or
if you rename Jframe control as form1 then code will be as

 public static void main(String[] args) {
        // TODO code application logic here
        form1 frm=new form1();
        frm.setVisible(true);
    }

------------------------------------------------------------------------
here main will be like this
/*
 * Main.java
 *
 * Created on 
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package cal;

/**
 *
 * @author Administrator
 */
public class Main {
    
    /** Creates a new instance of Main */
    public Main() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        form1 frm=new form1();
        frm.setVisible(true);
    }
    

}