Java Application vs. Java Desktop Application in Netbeans [duplicate]

我们两清 提交于 2020-01-04 14:14:18

问题


Possible Duplicate:
Netbeans GUI editor generating its own incomprehensible code

In Netbeans(older versions), there are two types of applications to choose from when you're starting a new project. Java Application and Java Desktop Application.

What are the differences between these two types?

EDIT :

In newer versions of Netbeans, the Java Desktop Application is gone and only Java Application is available. Does that mean they have converged the functionalities of those two types in to one?

Now I'm using Java Application to create programs with GUIs as described here. Is it the correct way to go about it regarding creating applications with UIs?


回答1:


While the answers provided are all correct, I wish to add some details. The Java Desktop Application is more like a template for a Java Swing UI app. It provides the Main App, the Main View and the About Dialog by default. You can add all your UI components thru the Main View class.

Other than that it's quite similar to a regular Java App. Note that you can also create a Java Swing UI app by selecting the regular Java App template.

This is supported until NetBeans 7.0. Now its deprecated and developers are adviced to use the NetBeans platform to develop UI applications. But you can definitely continue to create Swing Apps if you'd wish.




回答2:


Java application means core java application with no ui. and java Desktop Application means application with ui using Swing. In java desktop application you can use the drag n drop tool to create UI




回答3:


Java Desktop Application is the java application with UI components, while Java Application represent an application with core java libraries.

Please note: This(Java Desktop Application project type) is dropped in newer versions(7+) of NetBeans.

Since it is dropped, you can imagine, it's not preferable.



来源:https://stackoverflow.com/questions/13097706/java-application-vs-java-desktop-application-in-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!