简体   繁体   English

如果不推荐使用Swing,那么替代方案是什么?

[英]If Swing is deprecated, what is the alternative?

I heard that apparently Swing is being developed no longer. 我听说显然Swing正在开发中。 I like Swing and use it all the time. 我喜欢Swing并且一直使用它。

What should I now be using instead? 我现在应该使用什么呢?

I never heard such thing and still developing swing apps. 我从来没有听过这样的事情,仍在开发摇摆应用。 Don't give wings to rumors. 不要谣言。 But as an alternative you can use JavaFx or swt or buoy . 但作为替代方案,您可以使用JavaFxswt浮标

You probably read something about the 'Swing Application Framework', which while built using Swing, is not 'Swing'. 您可能已经阅读了一些关于'Swing Application Framework'的内容,虽然使用 Swing 构建 ,但不是'Swing'。


From Swing Application Framework - Status and Roadmap . 来自Swing应用程序框架 - 状态和路线图

Development on an open source Reference Implementation called appframework was begun in 2006.[1] 开发了一个名为appframework的开源参考实现,于2006年开始。[1] It was originally expected that this implementation would be the means for integrating JSR 296 into the upcoming Java SE 7 (Dolphin) version of the Java programming language, and the project was scheduled to be included in milestone 5 of the JDK7 development. 最初预计此实现将是将JSR 296集成到Java编程语言即将发布的Java SE 7(Dolphin)版本中的手段,该项目计划包含在JDK7开发的里程碑5中。 However, in August 2009, it was announced that the project would not be included due to an inability to reconcile design flaws and achieve consensus among the JSR 296 team before the milestone 5 deadline.[2] 然而,在2009年8月,由于无法协调设计缺陷并在里程碑5截止日期之前达成JSR 296团队的共识,因此宣布该项目不会被包括在内。[2]

The original Swing Application Framework implementation has been put on hold indefinitely.[3] 最初的Swing应用程序框架实现已被无限期搁置。[3] The last public release of the appframework project is version 1.03.[1] appframework项目的最后一个公开发布版本是1.03版。[1]

Older question, but worth a reference: 较老的问题,但值得参考:

Is JavaFX replacing Swing as the new client UI library for Java SE? JavaFX是否将Swing替换为Java SE的新客户端UI库?

Yes. 是。 However, Swing will remain part of the Java SE specification for the foreseeable future, and therefore included in the JRE. 但是,在可预见的未来,Swing仍将是Java SE规范的一部分,因此包含在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. 虽然我们建议>开发人员在构建新应用程序时尽可能多地利用JavaFX API,但可以使用JavaFX扩展Swing应用程序,从而实现更平滑的过渡。

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

Jan 2019 Latest 2019年1月最新

For reference, AWT & Swing have been moved to java.desktop since Java SE 9. You can watch for future changes here. 作为参考,自Java SE 9以来,AWT和Swing已移至java.desktop 。您可以在此处查看未来的更改。 JavaFX (added to JDK since 8) was removed from the official JDK in Java 11. So its hard to say what is "official" anymore. JavaFX (从8开始添加到JDK)已从Java 11中的官方JDK中删除。因此很难说什么是“官方”了。 However JavaFX's development has increased since the decoupling, with its new home here . 然而,JavaFX的开发自解耦以来已经有所增加 ,其新家就在这里

There is nothing wrong with swing. 挥杆没有问​​题。 Personally i don't like SWT. 我个人不喜欢SWT。 You have to read input-values from widgets and store them in normal variables before a dialog is disposed. 您必须从窗口小部件读取输入值,并在处理对话框之前将它们存储在常规变量中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 已弃用的“GoogleCredential”的替代方法是什么? - What is the alternative to the deprecated 'GoogleCredential'? 在Mac上的Java Swing应用程序中使用现已弃用的com.apple.eawt.ApplicationAdapter的替代方法是什么? - What's the alternative to using the now deprecated com.apple.eawt.ApplicationAdapter in Java Swing apps on the Mac? 使用已弃用的 Hamcrest 方法 is() 的替代方法是什么? - What is the alternative to using the Deprecated Hamcrest method is()? 已弃用的springfox ClassOrApiAnnotationResourceGrouping类的替代方法是什么? - What is the alternative for deprecated springfox ClassOrApiAnnotationResourceGrouping class? flyway.setSchemas()方法的替代方法是什么,因为这是不推荐使用的? - What is the alternative of flyway.setSchemas() method as this is deprecated? 包装服务器引导程序已弃用,替代方法是什么? - Wrapping server bootstrapper is deprecated, what is the alternative? 不推荐使用 FileUtils.writeStringToFile 方法的替代方法是什么? - What is the alternative to deprecated the FileUtils.writeStringToFile method? 已弃用的com.apple.eawt.ApplicationListener的替代方法是什么 - What is the alternative for deprecated com.apple.eawt.ApplicationListener Spring RMI 的替代品是什么? (因为它已被弃用) - What's the alternative for Spring RMI? (since it's deprecated) @Bean(autowire = Autowire.BY_TYPE) 已弃用。 什么是替代方案? - @Bean(autowire = Autowire.BY_TYPE) is deprecated. What would be alternative?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM