简体   繁体   English

如何打开特定的Jframe作为主要的Jframe?

[英]how to open specific Jframe as a main jframe?

在此处输入图片说明

when I run the project compiler says BUILD SUCCESSFUL but not any window is appear. 当我运行项目编译器时,说“ BUILD SUCCESSFUL”,但没有任何窗口出现。 when I runt the project I want to start main_window as a default window. 当我运行项目时,我想将main_window作为默认窗口启动。 but I have no Idea how to setting up this. 但我不知道该如何设置。

If you are creating a jar file (as I assume you will be doing from your previously deleted question), the main class would be specified by the jar file's manifest. 如果您正在创建一个jar文件(就像我假设您将从以前删除的问题中所做的那样),则主类将由jar文件的清单指定。

eg, the manifest file, named MANIFEST.MF could contain a line looking like: 例如,清单文件(名为MANIFEST.MF可能包含以下内容:

Main-Class: gui.main_window

Right Click on the Netbeans tool-bar . 右键单击Netbeans tool-bar An drop down menu should appear. 将会出现一个下拉菜单。 Select Customize and scroll down through the options until you see Run File . 选择“ Customize并向下滚动选项,直到看到Run File Drag the button onto the tool-bar . 将按钮拖动到tool-bar Now select the main_window.java and hit the Run File button. 现在选择main_window.java并单击“ Run File按钮。

The IDE should run only the file. IDE应该仅运行文件。

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

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