JDK-6552957 : Using HTML in tooltip leaves a white line in right and left sides
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2007-05-02
  • Updated: 2013-04-26
  • Resolved: 2013-04-26
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]

A DESCRIPTION OF THE PROBLEM :
JRE 1.6 shows a white line on both left and right side of a tooltip text. This happens only when the background colour of the tooltip is changed to a different colour. No issues in JRE 1.5 or before.

Example:
String strTooltipText = "<html><body bgcolor='#18AFE5'><strong>HELP:</strong>&nbsp;<BR><HR>";
strTooltipText += "&nbsp;<strong>This is the help text</strong><BR></body></html>";

component.setToolTipText(strTooltipText);

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :

Set a tooltip for a Swing Component with a different background colour using HTML. You would see a white line in both left and right side of the tooltip.

Example:
String strTooltipText = "<html><body bgcolor='#B8CFE5'><strong>HELP:</strong>&nbsp;<BR><HR>";
strTooltipText += "&nbsp;<strong>This is the help text</strong><BR></body></html>";

component.setToolTipText(strTooltipText);

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No white border should appear on either side.
ACTUAL -
You would see a white border in both left and right side of the tooltip.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Example:
String strTooltipText = "<html><body bgcolor='#B8CFE5'><strong>HELP:</strong>&nbsp;<BR><HR>";
strTooltipText += "&nbsp;<strong>This is the help text</strong><BR></body></html>";

component.setToolTipText(strTooltipText);
---------- END SOURCE ----------

Release Regression From : 5.0u11
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
This is pretty old bug and doesn't seem to be a priority at this moment, closed as will not fix
26-04-2013

EVALUATION This is a regression of the fix for bug #5047379 for some reason that fix add 3 pixels to the left inset and 3 pixels to the right inset of the ToolTip
12-07-2007