Reputation: 1
hello I have a basic Java ability when it comes to writing code and creating such things as calcs and booking system, I am wanting to use the Desktop application in netbeans for a more professional look but I carnt manage to switch between visual forms i have created using buttons, in vb I would just set the form as me.visible(False) and Form2.visible(true). Any ideas guys thanks
Upvotes: 0
Views: 348
Reputation: 1446
Well it is very similar in Java too instead of typing
MyForm().visible(true)
Use
MyForm().setVisible(true);
Basically if you clicked a button and you wanted a new form to be displayed it would look something like
private void jButton1ActionPerformed(ActionEvent evt)
{
new TestForm().setVisible(true);
}
Upvotes: 2