Variable length bar


I am trying to implement a bar (rectangle) which would show the strength of the password. Depending on the strength, the colour used to fill the bar would vary so would the length. I also want to add text to the bar saying it 20% or 50% (strength value). Also I want to show 100% with a different colour say - grey. I was able to achieve this using the CanvasWidget but I feel that there is no need to use the jar just for this and feel wasted.

Can anybody help with a simple solution? I need to add this to the table, which I dont think should be a problem anyway.

As I have been searching, I cannot use the HTML5 because our very dear IE8 would not support it!!

Any other solutions??