Re: Update GUI while waiting on network result



carlg@xxxxxxxxxxxxxxxx wrote:
Andrew Thompson wrote:

carlg@xxxxxxxxxxxxxxxx wrote:

How do I force my JLabel to display on the screen when I set it's
contents before some business, ..

..ensure 'the business' is not done on the EDT.


What exactly do you mean by EDT?

Andrew is referring to the Event Dispatching Thread. This is where all the GUI work goes on, listening for user actions and responding. If you want a responsive GUI then you must ensure that non-GUI work does not block the EDT.

Are you saying I should kick off a
thread with 'the business' in it? Perhaps that'll work.

He is, it will. Don't forget to Thread.setPriority(Thread.NORMAL);
.