How can I show a mathemetical series in a JLabel?
Right now I do it like this by using a String with HTML tags.
String s = "<html>Σ<sup>N</sup><sub>i = 0</sub> x <sub>i</sub></html>";
Result:

Is there a nicer way to do this? Because the output is very ugly. Usually N should be above the sigma and i = 0 below.
A nicer way to do this is using a third party library to render Latex code in Java.
There are several of them for example JLatexMath, here's a example tutorial.
For instance, using the program of that example your summatory could look like this:

Or like this:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With