简体   繁体   English

是否可以在JavaFX应用程序中嵌入Swing组件?

[英]Is it possible to embed a Swing component in a JavaFX application?

I've heard rumors of people creating their own custom libraries for one, but I have yet to find one for myself. 我听说有传言说人们会为其中一个创建自己的自定义库,但我还没有为自己找到一个。 I need it because I need to mount another running applet (in a JPanel in Swing) for my application. 我需要它,因为我需要为我的应用程序挂载另一个正在运行的applet(在Swing中的JPanel中)。

不,至少不是以官方支持的方式。

There is the SwingView in the ThingsFX 3rd party library to do this. ThingsFX 3rd party库中有SwingView可以做到这一点。

I've never tried it, so I can't recommend for or against it. 我从来没有尝试过,所以我不推荐它反对。

ThingsFX has a website . ThingsFX有一个网站

Here is a screenshot of Swing components rendered on a JavaFX Stage using ThingsFX. 这是使用ThingsFX在JavaFX Stage上呈现的Swing组件的屏幕截图

东西

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

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