Java - AWT / Swing - handling the Event Descriptor Thread
Posted
by waitinforatrain
on Stack Overflow
See other posts from Stack Overflow
or by waitinforatrain
Published on 2010-03-30T19:59:25Z
Indexed on
2010/03/30
20:03 UTC
Read the original article
Hit count: 446
Hi,
I have a question about the 'Event Descriptor Thread'. I have a Main class that is also a JFrame. It initialises the rest of the components in the code, some of them do not involve Swing and some of them do. Is it enough to simply initialise the Main class using the EDT like this?...
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
new Main();
}
});
}
This way everything would run on the Event Dispatcher thread.
© Stack Overflow or respective owner