You could also do something like:
Code:
double paymentValue;
try {
paymentValue = Double.parseDouble(payment.getText());
} catch (NumberFormatException e) {
popUpAMessageBox("that wasn't a number!");
}
if (paymentValue < 0) {
popUpAMessageBox("can't be less than zero!");
}


Comment