I’ve got a jFrame Form with an action handler that instantiates a new form and switches over to it using setVisible(true). That much works.
When I try to setVisible(false) on the current form, however, I get an error:
cannot find symbol
symbol: method setVisible(boolean)
location: class foo.bar
----
My action handler looks like this:
public void Login() {
//#TODO Log in code
setVisible(false); // <-- Error here
mainPage.mainScreen ms = new mainPage.mainScreen();
ms.setVisible(true);
}
I was trying to hide the “main” view, so to speak, and netbeans won’t allow this. I can instantiate a different view, show it, and it can show and hide itself all day long.