开发者

Using NetBeans, getting a cannot find symbol error where I am using setVisible

I have seen all of the posts on this site regarding the cannot find symbol error and none of them answered my question so here I am. To give you a better idea of what I am doing, I am creating a video store program that will send messages to a server which will send messages to a database and back and forth.

I have a class called login.java, a class called VideoStoreApp and a class called VideoStoreView. In my login.java class I have an if statement that is called to;

VideoStoreApp test = new VideoStoreApp();
test.setVisible(true);

I have an error at setVisible that says "class not found" and it prompts me to create a method inside videostoreapp called setvisible... I have used setVisible in my other classes with no problem. I also get the same error here if I use .show. Basical开发者_Go百科ly I am making a login screen pop up and then the main program appears but as of now both appear at the same time. I used super.setVisible(false) to make the login screen go away which actually worked, but as you know the main program was still visible the entire time behind that.

if (user.equals("employee") && pwd.equals("password") || user.equals("manager") && pwd.equals("password"))  
        {  
            super.setVisible(false); // no error here  
                        VideoStoreApp test = new VideoStoreApp();  
                        test.setVisible(true); // cannot find symbol  
        }  
        else.....

and in my main I have no errors...

...  
login appear = new login();  
        appear.setVisible(true);  
        launch(VideoStoreApp.class,args);  
...

Its my first time posting here guys so if I did something wrong I am sorry, I just really need help on getting this working.

entire project below;

http://paste.bradleygill.com/index.php?paste_id=281691

http://paste.bradleygill.com/index.php?paste_id=281692

''http://paste.bradleygill.com/index.php?paste_id=281693


VideoStoreApp does not contain setVisible, and it appears that neither does SingleFrameApplication, the class that you extend VideoStoreApp from.

Did you possibly mean VideoStoreApp.showMain();?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜