THis is how you can do it :
public static Frame getTopLevelParent (Component component)
{
Component c = component;
while (c.getParent() !=
null)
c = c.getParent();
if (c instanceof Frame)
return (Frame)c;
else
return null;
}
Pass your applet as an rgument (or one of its components)
Dimitris
Thor Erik Karlsen wrote:
I have an applet that shows a dialog that is supposed to be modal. Since the only way i have found to display a dialog within an applet, is to create a parent frame for the dialog, the dialog wont be modal for the applet, only for the frame. Because of this the dialog isnt modal within the applet.Can anyone send me the code for creating modal dialogs for applets?Thanks!!
-- Dimitrios Vyzovitis -- Information Processing Laboratory [EMAIL PROTECTED] -- Aristotle University of Thessaloniki [EMAIL PROTECTED] -- Dept. of Electrical and Computer Engineering http://egnatia.ee.auth.gr/~dviz