JFormattedTextField unusual format

61 Views Asked by At

I am formatting a text field like this:

bidField = new JFormattedTextField();
DecimalFormat d = new DecimalFormat("0.00");
int dp = 5;
d.setMinimumFractionDigits(dp);

NumberFormatter dnff = new NumberFormatter(d);
DefaultFormatterFactory factory = new DefaultFormatterFactory(dnff);
bidField.setFormatterFactory(factory);

But I would like to make part or last 2 digits BOld or diff color a bit like:

enter image description here

How can I do that?

0

There are 0 best solutions below