I've had pretty good luck using a GlassPane for this. Add a do-nothing mouse
listener to the glass pane, and then make the pane visible to disable input
or invisible to enable it.


// in init
getGlassPane().addMouseListener(new MouseAdapter() {}); 

public void disableUI() {       
  getGlassPane().setVisible(true);
  getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
}

-----Original Message-----
From: Harish Prabhu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 11:16 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: preventing a Menu /toolbar to be selected when a WaitCursor is
being displayed


Hi ,
  I display a wait cursor when my APplication is doing some intensive 
computation. During this time i Display a Wait Cursor. But the user is able 
to Click on a menu item or a toolbar item . I want to prevent this from 
happening ..ANy Comments ??
thanks ,
harish
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

_______________________________________________
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

Reply via email to