Two questions on the same topic! Swing only supports modal behaviour in JDialog (actually by virtue of Dialog). The advantage that this class has is that it creates a modal peer so the operating system will ensure that only events for the modal dialog will be processed. If you want modal behaviour anywhere else you need to stop events for any component(s) other that the modal one from being processed. You can achieve this by subclassing EventQueue and pushing an instance of this on to the event queue stack. The subclass needs to override dispatchEvent to only call super.dispatchEvent for events that you do want to get through. Regards Dave Wathen Goldman Sachs Asset Management 3rd Floor, Procession House 55 Ludgate Hill London EC4M 7JN +44 (0)20-7774-2998 It is not necessary to understand things in order to argue about them. (Caron de Beaumarchais) -----Original Message----- From: Geert Van Landeghem [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 8:45 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: JInternalFRame Hi, Does anybody know how to make a JInternalFrame modal? At this moment I'm using the following technique: If the parent frame gets selected(and focus) it automatically transfers control to the child frame Is there a better way? -----Original Message----- From: Radim Tlustý [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 5:21 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Modal JWindow Hi all. Does anybody know how to make JWindow modal? Radim ---------------------------------------------------------------------------- ---------- Geert Van Landeghem Reynders Etiketten [EMAIL PROTECTED] (Office) [EMAIL PROTECTED] (Home) 03/460.32.81 (Office) 0477/759.533 (GSM) <<Journey of thousand miles begins with first step>> ---------------------------------------------------------------------------- ---------- _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
