I have created one Jframe mainframe which size is fit to monitor size.
I have created another frame called subframe which size is 300,300 .
My problem is when i open the subframe from the mainframe iam not suppose to use mainframe without close the current frame . How can i achieve this please helpme........

Use a JDialog for the subframe - you can control its modality to block all input to other windows in your app while its open (and other variants)

I tried but still iam facing the same problem

Post your code for the JDialog. It definitely does work if you code it right.

I have three windows if i click the first window then second should be on top that i did using the property Isontop but now the problemis if i view the third window it also should be on top

yes that's correct,

1/ remove Modality for both (be sure that dialog.setAlwaysOnTop(true);)
2/ set differen Location on screeen fior both dialog.setLocation(x, y);

How to remove modality for JDialog or which method is used to do that......

dialog.setModal(false);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.