colors change randomly when screen repaints.
When click on the bar view, the bar will extend or shrink to where the
mouse is.
when the text field lose focuse, the bar view will be updated.