Given the following code:
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
ClientGUI gui = new ClientGUI();
gui.start();
}
});
}
everything works fine, I get a nice GUI window. OK. Now, lets add an infinite loop after gui.start() :
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
ClientGUI gui = new ClientGUI();
gui.start();
while (true) {
}
}
});
}
and the output is a blank window that does not react to window exiting. Can someone explain me what exactly happans here?