JDK-4832671 : Using ToolTips in an applet causes inactive window to become active
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1_02
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-03-14
  • Updated: 2003-03-26
  • Resolved: 2003-03-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.1_03 03Fixed
Related Reports
Relates :  
Description
========== to reproduce ========
- compile ToolTipTest.java attached to this bug

- run it with appletviewer on Windows 2000 or Windows XP

- when appletviewer with a frame appears, click the button "Click here",
  a child frame appears, make sure it has the focus by clicking on it.
  While this child frame has the focus position mouse cursor over "Click here"
  button without clicking it - the child frame disappears off the screen as the    main frame becomes focused.  

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.1_03 FIXED IN: 1.4.1_03 INTEGRATED IN: 1.4.1_03
14-06-2004

EVALUATION See comments.
11-06-2004

WORK AROUND None
11-06-2004

SUGGESTED FIX ------- ToolTipManager.java ------- *** /tmp/sccs.18aODJ Wed Apr 24 14:58:26 2002 --- ToolTipManager.java Wed Apr 24 14:57:59 2002 *************** *** 242,247 **** --- 242,258 ---- void showTipWindow() { if(insideComponent == null || !insideComponent.isShowing()) return; + for (Container p = insideComponent.getParent(); p != null; p = p.getParent()) { + if (p instanceof Window) { + if (!((Window)p).isFocused()) { + return; + } + break; + } + if (p instanceof Applet) { + break; + } + } if (enabled) { Dimension size; Point screenLocation = insideComponent.getLocationOnScreen(); ============================================================================= src/share/classes/com/sun/java/swing/plaf/windows/WindowsPopupFactory.java : 10a11 > import java.awt.Container; 19a21 > import java.applet.Applet; 274c276,285 < window = SwingUtilities.getWindowAncestor(owner); --- > for (Container p = owner.getParent(); p != null; p = p.getParent()) { > if(p instanceof Window) { > window = (Window)p; > break; > } > if(p instanceof Applet) { > window = new DefaultFrame(); > break; > } > }
11-06-2004