in the book I'm reading, each multithreaded GUI example has something like this:
public static void main(String[] args) throws Exception { EventQueue.invokeLater(new Runnable() { public void run() { JFrame frame = new SomeKindOfFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } }); }
(I mean EventQueue). but is the code not automatically executed in the main (EDT) thread?
java multithreading swing event-dispatch-thread
nicks Apr 25 '11 at 17:14 2011-04-25 17:14
source share