I'm using italian locale for my program so
Float.parseFloat("8,00")
must function well.
No. Float.parseFloat
is not locale dependent. So, there are two ways to fix your issue:
Format like this:
String.format(Locale.US, "%05.2f",info.getCuSurface())
Replace the comma when you parse:
info.setCuSurface(Float.parseFloat( ((String) cuSurfaceJTextField1.getValue()).replace(',','.')));