I have been eargerly awaiting the JFormattedTextField in JDK1.4,
        but I am finding them rather limiting.

        If I use a DateFormatter and dates in the format MM-dd-yyyy, the
        user must enter the dashes for the formatter to accept the input
        as valid.  I would really like something that doesn't require
        the user to know about and be required to enter the mask characters.

        I am also finding limitations to MaskFormatter.  I want to 
        support fields that are alphanumeric and variable length.  If I
        set the mask length to be the maximum length, the formatter 
        considers any value I enter to be invalid if it has trailing spaces.
        I can use a less restrictive mask in combination with the
        setValidCharacters() method to solve some of my problems, but it
        feels like I am standing on my head to do something that should
        be much easier.

        It also seems you can only support automatic upper-casing (or 
        lower-casing) of input if the field is alpha only.  I have 
        alphanumeric fields that I want to be able to automatically convert 
        to upper case, but the implementation of MaskFormatter doesn't 
        support that.  It would seem that for this, and other situations,
        mask formatter should allow to you extend the mask character
        choices (#,L,?,etc) with ones of your own creation.

        I thought about subclassing MaskFormatter to customize certain 
        behavior, but the methods I want to override are private, so I can't
        do that.  I don't think I can use MaskFormatter as is and I really 
        want to avoid re-implementing from scratch just to support my own 
        customizations.

        Has anyone been working with the formatters?  Am I missing an easy
        solution?  Has anyone else found some clever work-arounds?

        Maureen West
 
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to