Event-Dispatch Thread

Report a typo

Fill in the blank to complete the code.

Assume that we do not want to wait for the invoked thread to end before proceeding.

public class EventDispatchExample{
    public static void main(final String[] args) {
        SwingUtilities.___________(new Runnable() {
            @Override
            public void run() {
                final JFrame window = new JFrame();
                window.setTitle("Test Frame");
                window.setSize(600, 400);
                window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                window.setVisible(true);
            }
        });
    }
}
Enter a short text
___

Create a free account to access the full topic