Answer to Question #20870 in Java | JSP | JSF for Mike Balensiefer

Question #20870
I am trying to restrict character input in an option dialogue box. ref: The code shown limits the string values that can be input. (it can't keep you from entering a restricted value, it only alerts you to the entry.) I am trying to get this code to work with a DOUBLE value. So far I've been unsuccessful. Please help.
Expert's answer
Anything entered in a JOptionPane is stored as a string inJava.
When using "JOptionPane.showInputDialog" you canonly check the result of the input.
If it is not satisfied, re-query input.
Or you can use JTextField (allows the use of any filters onthe input.)
More details here:

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog