开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜