Thanks All for replying
One other fix / kludge would be to extract your JFrame's contentPane and put it in a newly created modal JDialog, but this is not very elegant (in my mind).
Pete can you please elaborate what you want to say.
My first question is, if you want B to act as a dialog, then why not make it a JDialog instead?
Rob its like i have two different application and now i am communicating between them, so i cant make the Frame B as Dialog.
See whether you can set the Frame with a modal property. See whether you can write a MouseListener which transfers focus on clicking
Campbell , no Frame do not have Modal property, and writing a MouseListner way may work, but how to transfer focus
One Way i have found is to setting the Frame A as setEnabled(false); and when frame B closes setting the Frame A as setEnabled(true); but in this case Frame A is not maximised when frame B closes.