0

I have a JProgressBar in my java code and I want to change the color of its "string painted" (string which shows percentage on JProgressBar), so Is there any way in java to change the color of the "string painted" of JProgressBar???

mKorbel
  • 109,525
  • 20
  • 134
  • 319

1 Answers1

3
UIManager.put("ProgressBar.background", Color.orange);
UIManager.put("ProgressBar.foreground", Color.blue);
UIManager.put("ProgressBar.selectionBackground", Color.red);
UIManager.put("ProgressBar.selectionForeground", Color.green);
Deutro
  • 3,113
  • 4
  • 18
  • 26