budsy remo wrote:Let's assume that i do call the setVisible() method . Then would the EDT be responsible for any further executions or calculations in the TestFr .
Not all executions in your TestFr have to be called on the EDT. Just those that involve Swing/AWT components (including operations on your frame itself).
And another(final) question is that let's say i put my code of TestFr in the eventqueue and the code starts running a lengthy calculation and then the user tries to cancel the application . Then will that cancel request be queued in the EventQueue or would be handled seperately ?? Thanks for your time .
Depends on what you mean by 'cancel'. If you mean externally shutting down the application through a task manager or through the console, or by calling System.exit(), then the application will terminate immediately. If you attempt to close the application through the system menu or the close button, this will trigger an event that ends up on the EDT, which will of course only be handled after the lengthy operation (and others) have finished.
You should never call long lasting operations on the EDT, because this makes your application unresponsive. They should be handled by SwingWorkers instead.