JFormattedtextField - formatting user input

Discussion in 'Java' started by wolfgang wagner, Jul 9, 2003.

  1. 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
     
    wolfgang wagner, Jul 9, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mack Attack
    Replies:
    1
    Views:
    10,785
    Christophe Vanfleteren
    Sep 15, 2003
  2. Pawel Poplawski
    Replies:
    0
    Views:
    666
    Pawel Poplawski
    Dec 3, 2003
  3. Webby
    Replies:
    1
    Views:
    3,041
    Webby
    Apr 21, 2004
  4. Steve Webb
    Replies:
    4
    Views:
    4,045
    Webby
    Apr 29, 2004
  5. VisionSet
    Replies:
    0
    Views:
    368
    VisionSet
    Dec 24, 2004
Loading...

Share This Page