>>>>> Jacob Nikom writes:
Jacob> I used DecimalFormatter class:
Jacob> DecimalFormat myFormatter = new DecimalFormat("0000");
Jacob> String iString = myFormatter.format(myNumber);
Jacob> However, what I got was:
Jacob> 0001
Jacob> 0012
Jacob> 0344
Jacob> 1557
Jacob> (The pattern "####" did not work at all)
Jacob> Do you know, how I can get rid of leading zeroes and get
Jacob> my formatting correctly?
I never tried it but maybe this does what you want:
http://www2.jps.net/~adahlman/programs/PaddedDecimalFormat.java
http://pws.prserv.net/ad/programs/PaddedDecimalFormat.html (Javadoc)
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux.html
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]