Hi text field problem with floats - i need this urgently (deadline)

String string = (String) effortTextField.getValue();

this line give an execption

Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.String

when i try to enter a 8.0 in the textfield

any sugestions

String string = String.valueOf(effortTextField.getValue());