Maintenance Notice

The bugs.java.com site will be undergoing maintenance on 15th Dec 2017 21:00 PST to 16th Dec 2017 1:00 AM PST.
JDK-7123767 : Wrong tooltip location in Multi-Monitor configurations
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1,6,7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux,windows_7
  • CPU: x86
  • Submitted: 2011-12-21
  • Updated: 2014-02-05
  • Resolved: 2012-09-20
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8
6u38Fixed 7u40Fixed 8 b61Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux 3.1.0-1-amd64 #1 SMP Sun Dec 11 20:36:41 UTC 2011 x86_64 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
Multi-monitor setup, nVidia Corporation GF110 [GeForce GTX 580] (rev a1) 290.10 drivers

A DESCRIPTION OF THE PROBLEM :
If a java window spans over more than one monitor in a multi-monitor setup tooltips always appear on the first monitor, even for components that are displayed on other monitors. This means that the tooltip is not displayed at the location of the related component.
Issue is described also in bugs 7011796, 6453153 and 4825949.

This bug causes the application to look unprofessional to the customer and to them appears to be a bug within the application.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The issue can be reproduced with any java application that spans over more that one monitor.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
  Tooltips should appear on the monitor on which the corresponding component is located.
ACTUAL -
The tooltip appears right justified on the 1st monitor even if the component is on the 2nd monitor.

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
Verified in JDK8b117 Windows 7 Pro x64 Test test/javax/swing/ToolTipManager/7123767/bug7123767.java passed successfully
2013-11-26

EVALUATION On multi-monitor configurations Component.getLocationOnScreen() may return negative values. Additionally, ToolTipManager.showTipWindow() method calculates tip window location from Component' getLocationOnScreen() return data and draws tip window using the same GraphicsConfiguration as component's top-left corner, which again can be of negative value. When component is streched across multiple screen devices, this may lead to a situation when it's tooltip is drawn on wrong monitor. To fix this we should count all GraphicsConfiguration instances and determine correct screen device to draw on. We should also take into account that: 1) tip window preffered location could be set 2) prefered location could be greater than total virtual bounds of all monitors. To make tip window visible in such case we move it to the corresponding corner of total virtual bounds 3) exact order of monitors (left-to-right and top-to-bottom) is unknown
2012-07-30