Math Formula in Java смотреть онлайн
This video is brought to you by http://SoftwarePulse.co.uk
The challenge in this tutorial is to present a formula within our application. This example makes use of the third party library “JLaTeXMath – A Java API to render LaTeX” which is available under GNU licence and can be obtained from https://www.scilab.org/en/projects/thirdparty_project/jlatexmath.
Once in place then it’s a simple case to build a program to display the result. Create a new class extending the JFrame class and included a main() method.
Assigned The formula to a string where the Java formula using the JLaTexMath controls is “L = \\frac {1}{2}[x^2 + y^2]^\\frac{1}{2}”.
Pass the formula string as a parameter when creating a TeXFormula object. From the TeXFormula object call the createTeXIcon method passing the STYLE_DISPLAY constant from the TeXConstants class and the font point size which in this case I’m using 40. There are other styles which can be used such as STYLE_SCRIPT so feel free to try out some of the options.
Create a BufferedImage and pass it width, height and the constant “BufferedImage. TYPE_4BYTE_ABGR”
Then call the paintIcon method of the TeXIcon object passing a container, a graphics object and zeros for the other two parameters which are used to adjust the size of the image in some cases. For the container pass a new JLabel, for the graphics object pass the output of the getGraphics method from the BufferedImage.
To display our formula, create a JLabel and call the setIcon method for the label passing the TeXIcon object.
Finally we create a JPanel to use as the main panel within our Frame and add the JLabel to the panel. This panel is then added to our application frame, the frame is set as visible and the containers packed to use auto resizing.
That’s it, our formula is displayed within our Java application
I chose to download the “JLaTeXMath minimal built for GeoGebra and MathGraph32” version which is a zip file and then extracted the JAR file and added this as an external library to my project.
You can download the source code from http://softwarepulse.co.uk/tutorials/math-formula-in-java/ , all we ask is for your email address to send to a link to the download page and to keep you updated on what's new. You can unsubscribe at any time and we do not share your details with anyone else.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Math Formula in Java» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.