Hi there,
Just new to Java.
I am reading a book in which there are 2 ways to start the program.
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { JFrame frame = new TestFrame(); ... ... } }); }
The other way is without the EventQueue.invokeLater():
public static void main(String[] args) { JFrame frame = new TestFrame(); ... ... }
Tried both of them, and both of them worked.
So why should I put the EventQueue.invokeLater() in the codes? (I read the API document, but just don't really understand...)
Thx.