I Used .setBackground and .setForeground and they didn\'t work, the color is like Orange, can\'t change it.
.setBackground
.setForeground
You should set the setStringPainted property to true:
progressBar.setStringPainted(true); progressBar.setForeground(Color.blue); progressBar.setString("10%");