when i change the code in the jbutton from this:
Code:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
form_two frmTwo = new form_two();
frmTwo.setVisible( true );
}
to this:
Code:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
form_two frmTwo = new form_two();
frmTwo.setVisible( true );
form_one.setVisible( false );
}
this is the error that i get!?:
Code:
forms/form_one.java [30:1] non-static method setVisible(boolean) cannot be referenced from a static context
form_one.setVisible( false );
^
1 error
Errors compiling form_one.
i understand that its because the creation of the form_one is in the scope of this fuction so how do i get the button to recognise form_one? cheers again.