JFormattedtextField - formatting user input

  • Thread starter wolfgang wagner
  • Start date
W

wolfgang wagner

hi

im trying to restrict user input in a JFormattedTextField. the user should
only be allowed to input numbers in a special format. for this purpose i use
a MaskFormatter. this works perfect, but my problem is that if i set a
MaskFormatter to ###.## $ it only accepts a three dot 2 digit number. but
what to do if i also want to allow ##.# $ ???? schould i add another
MaskFormatter to the TextFiled? or is there another possibility?? an example
would be helpful.

thx in advance

wolfgang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top