I would suggest you to use its own API:
public void setStringPainted(boolean b)
Sets the value of the stringPainted property, which determines whether the progress bar should render a progress string. The default is false, meaning no string is painted. Some look and feels might not support progress strings or might support them only when the progress bar is in determinate mode.
and
public void setString(String s)
Sets the value of the progress string. By default, this string is null, implying the built-in behavior of using a simple percent string. If you have provided a custom progress string and want to revert to the built-in behavior, set the string back to null.
The progress string is painted only if the isStringPainted method returns true.
Reference is always a good thing. :)
Mind that to enable editing the value during its run you should consider having a ChangeListener
attached to the progress bar.