JDK-8214253 : Tooltip is transparent rather than having a black background
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8,11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-11-23
  • Updated: 2020-01-13
  • Resolved: 2019-03-05
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.
JDK 11 JDK 12 JDK 13 JDK 8 Other
11.0.4-oracleFixed 12.0.2Fixed 13 b14Fixed 8u221Fixed openjdk8u222Fixed
Related Reports
Relates :  
Description
Test name: SwingSet2.jar  
Product(s) tested: JDK8u202 b04(64bit) , JDK12b21
OS/architecture:Oel7.5 uek x64 
VM Options:-Djdk.gtk.version=3 -Djdk.gtk.verbose=true 

1. Run the demo with the gtk version set at command line to 2 and then to 3.
2. Compare the rendering of the JToolTip  by placing the mouse on any of the demo toggle buttons.
Expected: Tooltip is black with its t4ext being clearly visible.
Actual: on GTK3.0 the Tooltip is transparent  with its text not clearly visible.

Seen on jdk8u202b04 as well as jdkb12.
Comments
This fix has introduced a small regression https://bugs.openjdk.java.net/browse/JDK-8220349. The fix for the regression is going on.
01-04-2019

Fix Request (12u) This follows the already satisfied fix requests in 11u and 8u. Patch applies cleanly to 12u. SwingSet2 tooltips look fine after the patch, and looks wrong before the patch. The risk is minimal.
01-04-2019

Fix Request This issue solves GTK 3+ compatibility problem. Patch applies cleanly to 11u (and I see 11.0.4-oracle), and to 8u with reshuffling (and I see 8u221/222). SwingSet2 tooltips look fine after the patch, and looks wrong before the patch. 8u requires -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Djdk.gtk.version=3 to reproduce. The risk is minimal.
18-03-2019

The tooltip background is not transparent, but the tooltip background color is almost same as the component color, which gives illusion of transparent tooltip. For other L&F, the tooltip background color is different from panel color. Further investigations needs to be done on how the tooltip background color is chosen? In addition to that, if we change to theme to something like Raleigh, this issue will not be visible as the tooltip background color will be different from panel color. So this is a gtk3 theme specific issue. This issue is reproducible in all the themes. So not a theme specific issue. This is an issue with gtk version 3.20 and later. gtk has made some major changes in their theme handling in gtk 3.20 and applications need to change to adapt to those changes. This issue is reproducible in Ubuntu 18.04 and OEL 7.5 as the gtk version is >3.20 in both whereas in Ubuntu 16.04, the default version is 3.18 and works fine. Further investigation needs to be done on exactly what changes are required to make this work with gtk version >=3.20.
08-01-2019

Is it possible to provide a single class test case to reproduce this?
24-12-2018

I am able to reproduce this on jdk12 and jdk8_202_b04 on OEL7.5
27-11-2018