What do you mean by a "new process". Do you mean a new
thread?
Creating new JFrames does not create new threads. However Swing automatically process all events in the EventDispatchThread, that means that if you create your new JFrame from an event handler, then it will be created by the EventDispatchThread.
Case 1: The first frame created by the main thread In this case the JFrame is created by the main thread, if another frames are created in the JFrame constructor, they will be created by the main thread, unless you use SwingUtilities.invokeLater().
Case 3: You explicitly create your Frames in the EventDispatchThread In this case the main method is being executed by the main thread, then I explicitly ask that the new JFrame be created in the EventDispatchThread.
Case 3: The JFrame is created from an event In this case, as the new JFrame is create from a event, it will be create by the EventDispathThread.
Case 3: The JFrame is created from another thread In this case the JFrame will be created by a new thread.
In all the cases, no matter which thread creates the new JFrame. All events will be processed by the EventDispatchThread.
New Threads, apart from the EventDispatchThread, are not spawned on the creation of a new JFrame.
Now, although the EventDispatchThread is created once, it is used for the event processing, not for the creation of the JFrame itself.
I hope this helps.
Regards,
Edwin Dalorzo
[ April 06, 2006: Message edited by: Edwin Dalorzo ]
[ April 06, 2006: Message edited by: Edwin Dalorzo ]