简体   繁体   English

在netbeans中运行主项目时未显示GUI

[英]GUI not showing up on running the main project in netbeans

I made a swing GUI using net beans, When I run the main project, the GUI is not showing up. 我使用net bean制作了一个摆动GUI,当我运行主项目时,该GUI没有显示。 But the output window shows the build successful.Run file is working ok. 但是输出窗口显示构建成功。运行文件运行正常。 What might be wrong ? 可能是什么问题? Thanks in advance.. 提前致谢..

Just guessing here, but do you actually create an instance of the GUI and then set it visible somewhere in a method, for example, your main() method? 只是在这里猜测,但是您实际上是否创建了GUI的实例,然后将其设置为在方法的某个位置可见,例如您的main()方法?

For example 例如

MyGuiClass app = new MyGuiClass();
app.setVisible(true);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM