I Used .setBackground
and .setForeground
and they didn't work, the color is like Orange, can't change it.
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);
You should set the setStringPainted property to true:
progressBar.setStringPainted(true);
progressBar.setForeground(Color.blue);
progressBar.setString("10%");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With