Error assistance

I'm writing a part of my code but i have an error either way i write it this is part of the programming im writing. the error lies in that if s is string like it is now return s is the error because of incompatible types. while if i switch it to int i get three errors. How would i fix this so it will run? ( this is only part of the whole program)

public static int leftpad (int value, int width)
{ String s; // String to be returned
int m; // length of s
DecimalFormat fmt = new DecimalFormat("0");
// convert value to a String with two decimal place
s = fmt.format(value);
// determine the length of s
m = s.length();
// pad s by spaces on the left so that the resulting length of s is width
for (int i = 0; i < width - m; i++)
{ s = " " + s;} // one space between the " "
return s;
}
} // end of class