I have a JFormattedTextField with the Name Hectare. The double type value is declared as shown below
String cultivationSize = JFormattedTextField3.getText();
double hectare = Double.parseDouble(cultivationSize);
Now the problem is that when i enter more than 3 digits, by default the comma is entered after 3 digits, e.g. 1,000. I have to add this value to some other value. But, due to this comma,I am unable to do it.
How can I remove comma and add this value to some other value?
Call the getValue() instead of getText() on JFormattedTextField
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With