I have a dark gray JPanel with JLabel on it. I set new Color(0, 0, 0, .5f) (tranparent) as the JLabel background, and change the text several times with the button. The problem is that every time the text changes, the previous text still remains with the new text. I am changing the text from â123456789â to â1234567â, â12345â and â123â. Here is a screenshot:

How do I get rid of this "shadow"?
source share