How to display Math Symbol in JLabel
I want to display like example 1e10 to 10^10 in JLabel, the ^10 become开发者_运维知识库 small size.
To display a label with xy:
JLabel l = new JLabel ("<html>x<sup>y</sup></html>");
You won't be able to do that just by using JLabel (assuming you don't want to put an image inside your JLabel).
If it is really necessary you could write a custom Swing control... which would consist of several JLabels I guess.
精彩评论