JProgressBar.isStringPainted() has the following syntax.
public boolean isStringPainted()
In the following code shows how to use JProgressBar.isStringPainted() method.
import javax.swing.JProgressBar; import javax.swing.SwingConstants; // w w w .j ava 2s. c o m public class Main { public static void main(String[] argv) throws Exception { int minimum = 0; int maximum = 100; JProgressBar progress = new JProgressBar(minimum, maximum); progress.setOrientation(SwingConstants.HORIZONTAL); int newValue = 33; progress.setValue(newValue); System.out.println(progress.isStringPainted()); } }