My question is this:
For example, enter the number "1" in a JTextField
, then, before sending the number to the database and make the corresponding Insert, pass the number to double, and the number in the database is entered as entered in the JTextField
(1), and not (1.0). The type of data in my database is float. I have tried in many ways and I still can not get it.
I've tried with:
Double.valueOf(JTextField.getText());
And also with:
Double.parseDouble(JTextField.getText());
I have also tried a lot of validations and it does not validate me either.