What is the regular expression for valdating a 'price' in a jtextfield
- by wniroshan
I want to validate a jtextfield as user inputs a price of some item.
I have a perfectly working code which beeps and discard if user inputs some character that doesnt match the regular expression.(for regular expression "[0-9]+" it accepts any number of digits and beeps if a letter is given as input)
But the problem is I want to validate an input…