且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Shift + F6和右键单击之间的区别?

更新时间:2023-12-04 11:18:34

当我们通过单击运行"运行项目时,该项目将从主类文件(即具有主入口点的类)开始.但是,当我们按 Shift + F6 时,当前在编辑器窗口中打开的文件将使用其自己的主函数运行.因此,可能您正在这样做.可能您已经设置了Look&感觉项目不在定义GUI的文件中,您只需按 Shift + F6 即可启动GUI框架.因此,在没有设置L& F的情况下开始框架.
只需清理并构建项目,然后查看最终.jar文件的输出.

When we run the project by clicking "Run", the project is started with the main class file, i.e., with class having main entry point. But when we press Shift + F6, the file currently open in the editor-window is run using its own main function. So, may be you are doing the same. Probably you have set the Look & Feel of the project in a file other than the file defining your GUI and you are just launching your GUI Frame by pressing Shift + F6. Thus starting the frame without L&F set.
Just clean and build the project and see the output of the final .jar file.