Java Application vs. Java Desktop Application in N

2019-07-20 08:39发布

问题:

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.