you should use repaint() method that change the value of counterLabel.