Consider using the String.format() method. The format string is described in detail in the Formatter API linked to from there. They take a little getting used to, but are quite flexible.


...