还有比 Swing 更好的 Java 应用程序框架吗?

发布于 2024-07-13 14:17:27 字数 682 浏览 6 评论 0原文

我计划从事一些业余爱好 Java 项目。 我做过一些小型项目,所以我熟悉该语言本身并使用 Swing 构建 GUI。 我想让我的工作少一点临时性,也许找到一些在现实世界中可能有用的工具。

NetBeans 现在与 Swing 应用程序框架 捆绑在一起,这似乎是一个非常有用的工具。 它有助于弥合了解如何创建 JFrame 和如何在大型应用程序上下文中有效使用 JFrame 之间的鸿沟。 问题是 API 的大部分内容完全没有文档记录,而且几乎没有关于如何使用它的文档。 常见问题解答中只有两个问题,邮件列表几乎已经死了,我什至无法判断该项目是否正在积极开发或是否已被放弃。 我已经成功地根据 启动并运行它两年前的 JavaOne 演示文稿发布在该项目的主页上。

有更好的选择吗?是否有另一个工具/库/API 可以以对新手稍微友好的方式执行相同的操作? 请注意,我目前计划开发桌面应用程序,而不是寻找 Spring 和 Hibernate 等 J2EE 框架。

I'm planning to work on some hobby Java projects. I've done some small-scale projects, so I'm familiar with the language itself and building a GUI with Swing. I'd like to make my work a little less ad-hoc and perhaps find some tools that might be useful out in the real world.

NetBeans now comes bundled with the Swing Application Framework, which seems to be a very useful tool. It helps bridge the gulf between knowing how to create a JFrame and how to use one effectively in the context of a larger application. The problem being that there are large chunks of the API completely undocumented and there's virtually no documentation on how to use it. There are only two questions in the FAQ, the mailing lists are all but dead, and I can't even tell if the project is being actively developed or if it's been abandoned. I've managed to get up and running with it based largely on the two-year-old JavaOne presentation posted on the project's home page.

Is there a better alternative? Is another tool/library/API out there that does the same sort of thing in a slightly more newbie-friendly way? Note that I'm planning to develop desktop applications at the moment, and am not looking for J2EE frameworks like Spring and Hibernate.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

旧时模样 2024-07-20 14:17:27

创建良好桌面的基本原则与创建 Web 或企业应用程序相同。 因此 Spring 或其他框架的核心,例如 OSGiPicoContainer 可以轻松地在 J2EE 之外使用。 例如,Eclipse 使用 OSGi 作为其内部框架。 模型-视图-呈现器 (MVC) 模式最初用于 Smalltalk GUI 小部件。

事实上,对于我自己来说,我第一次发现并使用“IoC”框架(早在 Spring 之前)正是因为我正在寻找桌面应用程序开发的框架和组织原则。

RCP 更新

我看到有些人推荐 Eclipse RCP 或 Netbeans。 我已经完成了大量的 Eclipse RCP 开发,对于某些类别的应用程序来说,这非常棒。 然而,学习曲线非常陡峭,并且功能集可能远远超出您的需要。 对于您研究的任何框架,请记住这一点。

The basic principles for creating a good desktop are the same for creating web or enterprise applications. So the core of Spring or other frameworks such as OSGi or PicoContainer can easily be used outside of J2EE. For example, Eclipse uses OSGi as its internal framework. The original use of the Model-View-Presenter (MVC) pattern was for Smalltalk GUI widgets.

In fact, for myself, I first found and worked with "IoC" frameworks (long before Spring) precisely because I was looking for a framework and organizing principles for desktop application development.

Update on RCP

I see some people are recommending Eclipse RCP or Netbeans. I've done quite a bit of Eclipse RCP development and for certain classes of applications, it's great. However, the learning curve is very steep and the feature set may be way more than you need. Keep that in mind for any framework you investigate.

刘备忘录 2024-07-20 14:17:27

对于 GUI 库,我倾向于 SWT。 Eclipse 维护它并将其用于其 IDE。 我相信Azureus也用过它。 在多个平台上看起来不错并且非常易于使用。

For a GUI library I'd lean towards SWT. Eclipse maintains it and uses it for its IDE. I believe Azureus used it too. Looks good on multiple platforms and pretty easy to use.

恋你朝朝暮暮 2024-07-20 14:17:27

如果我今天启动一个基于 Java 的桌面应用程序,我会使用 JavaFX。

http://en.wikipedia.org/wiki/JavaFX

If i were starting a Java based desktop application today, i would use JavaFX.

http://en.wikipedia.org/wiki/JavaFX

微凉徒眸意 2024-07-20 14:17:27

您还可以使用 Qt 的 Java 绑定。 Qt 是一个多平台 C++ 框架,在我看来,它是 GUI 设计中最具可读性的对象模型之一。

请访问 Trolltech (诺基亚) Qt 网站

您可以使用以下命令查看演示(也有源代码) Java Web Start 功能。 它给人留下了关于什么可以做、什么不能做以及源代码的外观的良好印象。

You could also use the Java bindings of Qt. Qt is a multi-platform C++ framework which has, in my opinion, one of the most readable object models for GUI design.

Have a look at the Trolltech (Nokia) Qt website.

You can see a demo (which also has source code) using the Java Web Start feature. It gives a good impression about what can and can't be done, and how the source code looks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文