Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Anita Morales   on Apr 14 In Java Category.

  
Question Answered By: Sally Pierce   on Apr 14

For #3, tell it to get the length of the String (length or size, I
forget). Then do something like:

String str="";
for(int i=0; i<num.length; i++)
{
str+="0";
}
DecimalFormat formatter = new DecimalFormat(str);

It's not very efficient, but it should work.

Share: 

 
 
Didn't find what you were looking for? Find more on Text component and button problem Or get search suggestion and latest updates.


Tagged: