I have the next dialog to pop up and ask the user for some info:
String id = (String)JOptionPane.showInputDialog( null, "Post #", "Información del cliente.", JOptionPane.PLAIN_MESSAGE );
The format I would like it to be like one of this:
1. Only numbers.
or
2. Limit the first character to a "+" and the rest numbers.
or
3. Limit the first character to a "." and the rest numbers.
So, I hope you guys understand what I want.
I don't want to get the string and subtract the characters that I want, I want to limit the characters that the user can type in the dialog box.
Thanks.