tags:

views:

39

answers:

4

I want to display like example 1e10 to 10^10 in JLabel, the ^10 become small size.

A: 

You won't be able to do that just by using JLabel (assuming you don't want to put an image inside your JLabel).

Pablo Santa Cruz
A: 

You can do it. You should know the unicode for the symbol you are willing to put .
Here is sample

org.life.java
A: 

If it is really necessary you could write a custom Swing control... which would consist of several JLabels I guess.

m0s
+2  A: 

To display a label with xy:

JLabel l = new JLabel ("<html>x<sup>y</sup></html>"); 
dogbane