Hi everyone,
I have gone through regarding thread & swing components.I have got to know that most of the event are being handling by the event dispatch thread.So my question is this, When I create GUI inside main method, does all event handling occurs in the main thread with no help of event dispatch thread or . does main method implicitly call the event dispatch thread.
The main thread will create the GUI, unless you explicitly tell the EDT to do the work (SwingUtillities.invokeLater()).
It is okay, as long as you don't perform any actions on the GUI anymore after the EDT has started up (either trough invokeAndWait(), invokeLater(), pack() or setVisible()).
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth