I want to use several JavaFX components in a Swing application (especially JFXPanel to support HTML 5 support). My application is currently configured in Eclipse 4.3 (Kepler), and the latest version of Java 7 JDK is installed on my computer.
This tutorial from Oracle assumes that all you have to do is just reference the JavaFX class and it will work in the Swing application, so I print JFXPanel panel = new JFXPanel(), but Eclipse does not recognize it as a valid Java class. It recognizes other Java 7 classes, for example java.nio.
I can't figure out how to get Eclipse to recognize JavaFX classes. This issue was previously addressed with respect to JavaFX in Eclipse. The first answer said that you need to start by creating a new JavaFX project, which I cannot do because I already have a fairly developed Swing application. Secondly, use the e (fx) clipse plugin, but the tutorial also seems to require it. If there is something special that I need to do to get a non-JavaFX project in Eclipse to use JavaFX classes, I cannot figure out how to do this.
source
share