Mask - how to set text from the right side?

Discussion in 'Java' started by abrams, Feb 28, 2010.

  1. abrams

    abrams

    Joined:
    Dec 17, 2009
    Messages:
    2
    Hi

    I have a problem with MaskFormatter

    My mask formatter patter is ****/##/####
    what means: number of the document / mounth / year

    and the problem occur when I possess for example 1/01/01
    and I would like to put this value into TextFormattedField form api (setText or setValue).

    When I doing setText("10101") im getting 1010/1 /

    One way is to put a spaces into first third places but then I have a spaces and instead of my placeholderCharacter("_") so then the text looks terrible: " 1/01/10".

    I hope there is a other way to do this.

    Please help.

    Best regards.
     
    abrams, Feb 28, 2010
    #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. Russ

    Input mask on a text box?

    Russ, Dec 29, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    1,818
    Peter Blum
    Dec 30, 2003
  2. Bogdan
    Replies:
    1
    Views:
    799
    Bogdan
    Jun 16, 2009
  3. Marcin Tyman

    Conversion mask in hex to bit mask

    Marcin Tyman, May 6, 2008, in forum: Ruby
    Replies:
    4
    Views:
    825
    Robert Klemme
    May 6, 2008
  4. 187
    Replies:
    2
    Views:
    566
    Bart Lateur
    Jul 29, 2004
  5. Num GG
    Replies:
    5
    Views:
    159
    Num GG
    Nov 18, 2008
Loading...

Share This Page