if you use dialog you push a new, modal screen. you don't have to invalidate your screen as there is nothing changed on it.
Quote:
public void enterEventDispatcher()
Enters the event dispatcher.
The thread that calls this method (typically the main thread in the application) becomes the event-dispatching thread, which will execute all drawing and event-handling code.
Note that under normal circumstances this method does not return.
|
As the method does not return everything below is never executed. Put your code into the constructor of your application to get it executed.