okay..could someone tell me how to check if someone put in a float value in a text field. and if not how can i generate a dialogue box with an error. This is how it looks
marks1 = Float.parseFloat(tf1.getText().trim());
i stored the contents of the textfield into marks1. How can i do it?