How to fill color in a rectangle percentage wise?
<p>Hi how to paint a rectangle partially filled with color ?
I need to fill this according to the percentage of value generated by program.
I am using swing for my Java GUI <a href="https://i.stack.imgur.com/iyLz5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iyLz5.jpg" alt="enter image description here"></a></p>