I have a code that work perfectly on Swing but I want to integrate it on javaFX. I know that I must use SwingNode but the code dosen\'t work in javaFX. this is .jar of libra
If you don't mind it being rasterized at a specifc size, you could use the SwingFXUtils.toFXImage static method in javafx.embed.swing:
TeXFormula tex = new TeXFormula("a + b \\cdot x");
java.awt.Image awtImage = tex.createBufferedImage(TeXConstants.STYLE_TEXT, 12, java.awt.Color.BLACK, null);
Image fxImage = SwingFXUtils.toFXImage((BufferedImage) awtImage, null);
ImageView view = new ImageView(fxImage);
The fxImage instance could also be passed to the Labeled.setGraphic method for use in certain controls (e.g. buttons).