Re: FormattedTextField
[email protected] Sat, 19 Mar 2005 19:22:13 +0100
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > Hi all, > > I´m trying to render a JFormattedTexField with SimpleDateFormat in "initclass" > attribute, but it doesn´t work. > > Any sugestion? > > the code: > > <formattedtextfield columns="10" > initiclass="java.text.SimpleDateFormat(dd/mm/yyyy)"/> IMHO you can't give any parameters to the initclass attribute except a classname. You can help yourself by using an own descendant of SimpleDateFormat or you use (some kind of hack) a static getInstance() function in either a class functional related or solely for this purpose: public static java.text.Format getInstance() { return new SimpleDateFormat(...); } Or, you may use the locale attribute to specify the locale to use for the SimpleDateFormat to construct. I do not know if this works for brazilian locale and whether it results in the desired date format. Frank > > Gyowanny Queiroz > Brazil > > > _______________________________________________ > Forum mailing list > [email protected] > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com >