0

I wanted to create a jprogressbar that has a specific color on a specific range (eg. 50% green, 50% red). Is there a way to do that? What i currently have is a progressbar that changes the color of the whole bar. By the way i am not using any look and feels for this one. Thanks in advance.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Jer Yango
  • 582
  • 2
  • 8
  • 22

1 Answers1

1

Extend BasicProgressBarUI and override the the desired paint() delegate, as shown in this related example that overrides paintIndeterminate().

image

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045