How to display JLabel text for 1 second?

I'm assuming that you're calling this method on the event dispatch thread. (If not, you should be, since almost all Swing calls should be made there. ).

I'm assuming that you're calling this method on the event dispatch thread. (If not, you should be, since almost all Swing calls should be made there. ) You need to allow the thread to retake control, which it's not able to do because of your Thread.sleep().

Look instead at invoking a Timer or SwingWorker background thread which, after two seconds, will reset the text. download.oracle.com/javase/tutorial/uisw....

1 Used the Swing. Timer and it worked like a charm. Thanks.

– user967870 Sep 27 at 22:36.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions