I am making a Java application localized in French. I used some JSpinner
s that accept only a float.
The problem is that the decimal point (the separator between integer part and decimal part) in float numbers is represented by a comma (,
). This behavior make a number like 12.34
invalid and the JSpinner
reject it, but If I type 12,34
it will be accepted.
How can I force a JSpinner
to use a dot (.
) as the decimal point and not the comma ?
The main
method begin like this :
public static void main(String args[]) {
Locale.setDefault(Locale.FRENCH); // Set French as the application language
/* ... */
}