java - JavaFX 应该取代 Swing 吗?

标签 java swing user-interface javafx

习惯了Swing编程,听说过JavaFX。它是否应该取代 Swing 成为用 Java 编写桌面应用程序的首选平台?

换句话说,我应该为我的新项目选择 JavaFX 吗?

最佳答案

是的,JavaFX 正在取代 Swing。

另见Oracle官方文档:

http://www.oracle.com/technetwork/java/javafx/overview/faq-1446554.html#6

Is JavaFX replacing Swing as the new client UI library for Java SE?

Yes. However, Swing will remain part of the Java SE specification for the foreseeable future, and therefore included in the JRE. While we recommend developers to leverage JavaFX APIs as much as possible when building new applications, it is possible to extend a Swing application with JavaFX, allowing for a smoother transition.

另请参阅 SO 帖子:

关于java - JavaFX 应该取代 Swing 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21368990/

相关文章:

java - 添加 JLabel 作为 JPanel 的背景

java - 在 JCheckBox 中有一个左右对齐的标签

java - 需要在 Netbeans 上创建一个 WIZARD(jDialog vs CardLayout)?

java - JTextArea 在调整 JFrame 大小时出现奇怪的行为

java - 如何删除没有 SQL 的所有行

java - Jersey 与 tomcat 给出 404 错误

java - 动态 Web 项目创建中的 Eclipse 构建问题

ios - 强制刷新 UI 以更快地更改按钮颜色和内容

java - ImageIcon 扩展到窗口之外,调整窗口大小会扩展所有组件而不是显示更多

java - 使用 Apache POI 评估 Excel 公式