Ahmed Khan
Ahmed Khan

Reputation: 39

Output fraction as numerator over denominator in java?

I am working on a scientific calculator in java for which I need to output a fraction in its actual form like as numerator over denominator. Currently I am using JTextField to output my expressions.I know that this is not possible with JTextField, kindly guide me how this is possible ?

Upvotes: 3

Views: 140

Answers (1)

user3027400
user3027400

Reputation: 31

new JLabel("<html>2 <sup>2</sup>&frasl;<sub>3</sub></html>")

Upvotes: 1

Related Questions