Results 1 to 11 of 11
Thread: Math equation in Java Applet
- 06-22-2011, 07:22 PM #1
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
- 06-22-2011, 07:30 PM #2
How are you displaying it? Using a JLabel? A JTextField? The Graphics.drawString() method? Something else?
In short, the answer is yes. But it depends on how you're doing your drawing.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 06-22-2011, 07:48 PM #3
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
I am using a JLabel
- 06-22-2011, 07:48 PM #4
In that case, you could probably use HTML.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 06-22-2011, 07:54 PM #5
What do you mean with ugly? I guess that it does not look smooth.
You can use a plotting library. Check this:
How to draw a Smooth Curve using jfreechart
- 06-22-2011, 08:11 PM #6
I was under the impression that he was talking about the text display of the actual equation, not the graph itself. In which case, HTML tags might work. I could be wrong though.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 06-22-2011, 08:14 PM #7
- 06-22-2011, 09:00 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,400
- Blog Entries
- 7
- Rep Power
- 17
html sucks; look what my expression transmogrifier did to the OP's example:
It can't even do double (or more) subscripts; it may be adequate for simple single superscripts, but that's about it. I wonder if a LaTex package exists for Java ...Java Code:-<i>x</i><sup><font color=\"#8000\">2</font></sup>−<font color=\"#8000\">6</font>·<i>x</i>+<font color=\"#8000\">7</font>
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 06-22-2011, 09:33 PM #9
Good question! Our friend google returned this:
JLaTeXMath - A Java API to render LaTeX - A Java package to display LaTeX code in mathematical mode
- 06-23-2011, 02:27 AM #10
@ administrator:
I just tried it with your link. It works. I have a JButton now with a complicated formula on it (as an icon). Now I seem to have to learn TEX to make formulas other then this example.
@OP:
I had some difficulty finding an example. I used Feature Requests - JAMWiki Java Wiki Engine If you need more help, I'm an expert now
Last edited by Jodokus; 06-23-2011 at 03:09 AM.
No bug ever had to calculate its fitnessfunction.
- 06-23-2011, 07:36 AM #11
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,400
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Reading a Math Equation in the console
By JonB319 in forum New To JavaReplies: 7Last Post: 06-10-2011, 01:54 PM -
converting an algebraic equation to Java
By fsuarjun03 in forum New To JavaReplies: 2Last Post: 03-09-2010, 07:58 PM -
Need help with math equation
By annabellastorm in forum New To JavaReplies: 4Last Post: 01-10-2010, 05:12 PM -
Help with an equation in java
By coco in forum New To JavaReplies: 1Last Post: 07-31-2007, 07:47 AM -
Help with quadratic equation in java
By paul in forum New To JavaReplies: 1Last Post: 07-25-2007, 08:23 PM


LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks