is there a way to format jLabel text to show a number with power index?
For example I would like a label to show 2^2 as 2² or x^2 as x²
is there a way to format jLabel text to show a number with power index?
For example I would like a label to show 2^2 as 2² or x^2 as x²
As JLabel support HTML, you can use HTML to show x² as follow:
JLabel l = new JLabel("<html>x<sup>2</sup></html>");