I would like to make flash effect by: changing the background (of a JTextArea) into RED --> then wait for 1 second --> going back to WHITE. I do like this :
JTextArea jTextArea = new JTextArea();
jTextArea.setBackGround(Color.RED);
Thread.currentThread().sleep(1000);
jTextArea.setBackGround(Color.WHITE)
But it doesn't work, all what I have is the White Background, I don't see the Red one.
What am I wrong?
Thanks!