I Used .setBackground
and .setForeground
and they didn\'t work, the color is like Orange, can\'t change it.
You should set the setStringPainted property to true:
progressBar.setStringPainted(true);
progressBar.setForeground(Color.blue);
progressBar.setString("10%");
I think that these values are right for you
UIManager.put("ProgressBar.background", Color.ORANGE);
UIManager.put("ProgressBar.foreground", Color.BLUE);
UIManager.put("ProgressBar.selectionBackground", Color.RED);
UIManager.put("ProgressBar.selectionForeground", Color.GREEN);