@ Override public void windowLostFocus ( WindowEvent e ) { // This section is part of the bug fix for blank popup windows in linux. if ( ! enableHideWhenFocusIsLost ) { e . getWindow ( ) . requestFocus ( ) ; return ; } // This fixes a linux-specific behavior where the focus can be "lost" by clicking a child // component (inside the same panel!). if ( InternalUtilities . isMouseWithinComponent ( displayWindow ) ) { return ; } hide ( ) ; }
windowLostFocus Part of WindowFocusListener . Whenever the popup window loses focus it will be hidden .