Hi, Is it possible to have more than 1 modal dialog for different JFrames. I have to pop up a modal dialog on click of a button ( which is on a JFrame), that part is easy but tricky part is, there could be cases where I have multiple instance of JFrames visible on screen but since a Modal Dialog is already poped up it blocks the input to other JFrames. Is there a possible solution out of this ? I used to think that a modal dialog is modal to its parent Frame , but it seems to be modal to all other Frames. Regards, Vijay
Hi Vijay, As you may have guessed, Modal is to your application (all Frames). The only way out is to use non-modal dialogs and have each frame keep track of their own private dialog. Regards, Manfred.
Joined: Jul 30, 2001
Manfred, Thanks for replying to my query. Could you point out how to make a JDaolog behave as a modal dialog with out setting it modal explicitly. I tried JLayeredPane, it seems to provide soln only for JPanel but not JDialog. Is there any neat solution to my problem ? Regards, Vijay
Joined: Jan 09, 2001
Hi Vijay, No, there is no way to make a dialog modal to only a frame in Java. I don't know of any solution to your problem without writing some native code routines. Regards, Manfred.