Skip to main content

using MessageFormat !!!!!!

No replies
meike1
Offline
Joined: 2007-03-23
Points: 0

hello averybody!

i have this function:

public String FormatMoneda(float i)
{
MessageFormat mf = new MessageFormat("{0,number,$,#,###.##}");
Object[] objs = {new Float ( i )};
String result = mf.format( objs );
objs = null;
return result;
}

why when run the aplicattion, the program stoped in the fist line causing the error "Uncaught exception thrown - IllegalArgumentException"... i need use or install any more or the pattern in not a correct!!!!
or what is the correct pattern

i'm using the blackberry jde 4.1
thanks

Message was edited by: meike1