Drawing a progress bar in java