I have a JFormattedTextField
that should be able to accept double numbers with more than 3 decimal digits. It accepts entries 0.1
, 0.01
, 0.001
but rejects 0.0001
and numbers with more decimal digits.
This is how my code works now:
DecimalFormat decimalFormat = new DecimalFormat("0.0E0");
JFormattedTextField txtfield = new JFormattedTextField(decimalFormat.getNumberInstance(Locale.getDefault()));
How do I get my text field to accept numbers with more than 3 decimal digits?