I don't really know what the problem was, but I think the useful solution would be the Text Input Dialog in April's advice. However, don't forget to parseDouble the input, because it will return a String anyway.