You can use the Double.parseDouble (String) method to convert a string to double:
double d = Double.parseDouble("22.4");
To get TextField text, you can use the TextField.getString () method;
String text = TextField.getString();
So:
double d = Double.parseDouble(TextField.getString());
source
share