GUI1

package javaapplication18;

/**
*
* @author Auron
*/
public class GUI1 extends javax.swing.JFrame {

/** Creates new form GUI1 */
public GUI1() {
initComponents();
setVisible(true);
}

/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstan ts.EXIT_ON_CLOSE);
jButton1.setText("jButton1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jPanel1.add(jButton1);

getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);

pack();
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
new GUI2();
}


// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JPanel jPanel1;
// End of variables declaration


GUI2

package javaapplication18;

/**
*
* @author Auron
*/
public class GUI2 extends javax.swing.JFrame {

/** Creates new form GUI2 */
public GUI2() {
initComponents();
setVisible(true);
}

/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstan ts.EXIT_ON_CLOSE);
jButton1.setText("jButton1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jPanel1.add(jButton1);

getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);

pack();
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JPanel jPanel1;
// End of variables declaration

}


MAIN

package javaapplication18;

/**
*
* @author Auron
*/
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
new GUI1();
}

}


HELLLLLLLPPPPPPPPPPP