Second option is simpler. I thought I could be clever and discover something new, but it is not my day today :cheesy:
I will check user input with Character.isDigit() and kick of error message if anything wrong
I don't think so . . .
They are allow only to numbers but whole range of numbers, well zero onwards. Drop down box is good if you code calendar and don't know any other technique to do it(as their better then this) or you want to give them certaine values
@peter budo The quickest solution is what titaniumdecoy suggested...Use a JFormattedTextField to restrict input to numbers. Not sure why some of the other solutions here contain a book of code to do such a simple task.