Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Math Formula in javaFX

I want to know how to display math formula in a label for exemple in JavaFX. Like this picture : Sample formula I want the .jar of a library and a small example in JavaFX. I already found some libraries but they are only for Swing/AWT. I tried some of them, but they don't work for me.

Displaying fancy equations with Java

like image 673
AndroLife Avatar asked Jul 26 '14 16:07

AndroLife


1 Answers

Since JLaTeXMath is using the Graphics2D API for rendering, you can use FXGraphics2D to draw the output to a JavaFX Canvas. For sample code, please refer to my answer to another similar question https://stackoverflow.com/a/25037747/2592874

like image 149
David Gilbert Avatar answered Sep 21 '22 05:09

David Gilbert