2013-06-18 31 views
0

我在netbeans上創建了一個Java應用程序,並且我構建它以將其作爲.jar在Netbeans中選擇Java應用程序中的啓動表格

現在,當我運行我的.jar應用程序時,它不顯示任何內容,我想在應用程序啓動時在我的工程中運行一個窗體作爲默認窗體。

在Visual Studio中我用來做如下所示:

In Solution Explorer, right-click the project and choose Properties. 

The Project property page opens with the Application properties displayed. 

Choose the form you want as the startup form from the Startup Object drop-down list. 

但我不知道如何與Java應用程序做它neatbeans

我該怎麼辦?

+0

你試過在你的main()方法中打開'JFrame'嗎? –

回答

5

在netBeans中,您可以輕鬆地爲您的項目選擇主類。 爲了做到這一點,請右鍵單擊項目名稱,然後選擇屬性。現在點擊「運行」,並在其中顯示「主課程」瀏覽您想要的課程。 如果我理解你的問題,這是解決方案。

相關問題