简体   繁体   English

如何在 javaFX 2.0 应用程序中包装 swing 组件

[英]How to wrap a swing component in a javaFX 2.0 application

The ability to wrap a swing component in a javaFX application seems to have vanished from javaFX 2:在 javaFX 应用程序中包装 swing 组件的能力似乎已从 javaFX 2 中消失:

javafx.ext.swing.SwingComponent javafx.ext.swing.SwingComponent

is not there any more in javaFX 2 beta API. javaFX 2 beta API 中不再存在。

Is there still a way to do this in the new API?在新的 API 中还有办法做到这一点吗?

SwingNode class is used to embed a Swing content into a JavaFX application. SwingNode class 用于将 Swing 内容嵌入到 JavaFX 应用程序中。 Here is the link .这是链接

It seems that since javafx 2.0+, we can't embed Swing component into JavaFX (vice versa is possible, using JFXPanel class), detail in this link:似乎由于 javafx 2.0+,我们无法将 Swing 组件嵌入到 JavaFX 中(反之亦然,使用 JFXPanel 类)

https://forums.oracle.com/forums/thread.jspa?threadID=2364553&tstart=0 https://forums.oracle.com/forums/thread.jspa?threadID=2364553&tstart=0

I accidentally found this link when trying to embed Swing Calendar view component into JavaFX 2.0 application (which I suppose it's possible at the beginning).我在尝试将 Swing 日历视图组件嵌入到 JavaFX 2.0 应用程序中时偶然发现了这个链接(我想这在开始时是可能的)。

According to this issue on the FX 2.0 JIRA they aren't planning to support it in the initial release of FX 2.0.根据这个关于 FX 2.0 JIRA 的问题,他们不打算在 FX 2.0 的初始版本中支持它。 There's also no promise that they will do it down the road.也没有 promise 他们会在路上做。

http://javafx-jira.kenai.com/browse/RT-12100 http://javafx-jira.kenai.com/browse/RT-12100

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM