Netbeans中的Java应用程序与Java桌面应用程序 [英] Java Application vs. Java Desktop Application in Netbeans

查看:125
本文介绍了Netbeans中的Java应用程序与Java桌面应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
Netbeans GUI编辑器会生成自己无法理解的代码

Possible Duplicate:
Netbeans GUI editor generating its own incomprehensible code

在Netbeans(旧版本)中,当您启动新项目时,有两种类型的应用程序可供选择. Java应用程序 Java桌面应用程序.

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?

在较新版本的Netbeans中, Java桌面应用程序已消失,只有 Java应用程序可用.这是否意味着他们已经将这两种类型的功能融合到了一起?

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?

现在,我正在使用 Java应用程序来创建具有GUI的程序,如此处所述.用UI创建应用程序是否正确?

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?

推荐答案

虽然提供的答案都是正确的,但我想补充一些细节. Java桌面应用程序更像是Java Swing UI应用程序的模板.默认情况下,它提供了主应用程序,主视图和关于"对话框.您可以通过Main View类添加所有UI组件.

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.

除此之外,它与常规Java App十分相似.请注意,您还可以通过选择常规Java App模板来创建Java Swing UI应用.

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.

在NetBeans 7.0之前一直支持.现在已弃用它,建议开发人员使用NetBeans平台来开发UI应用程序.但是如果您愿意,您绝对可以继续创建Swing应用程序.

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.

这篇关于Netbeans中的Java应用程序与Java桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆