-
Bug
-
Resolution: Fixed
-
P3
-
10, 11, 12, 13, 14, 15
-
b05
-
x86_64
-
windows_10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8257156 | 13.0.6 | Ekaterina Vergizova | P3 | Resolved | Fixed | b02 |
JDK-8251873 | 11.0.10-oracle | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
JDK-8252917 | 11.0.10 | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
JDK-8254121 | 11.0.9.0.1-oracle | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
JDK-8252958 | 11.0.8.0.4-oracle | Sergey Bylokhov | P3 | Closed | Fixed | b01 |
Windows 10 with HiDPI display with everything scaled at 200%
A DESCRIPTION OF THE PROBLEM :
HTML tooltips aren't big enough to contain their contents on Windows HiDPI displays, so the final word on a line wraps to the next line. If it is a multi-line tooltip, then the final line is missing entirely.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached program. Mouse over the button and wait for the tooltip to appear
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The tooltip says "Some tooltip text"
ACTUAL -
The tooltip says "Some tooltip"
---------- BEGIN SOURCE ----------
package com.company;
import javax.swing.*;
import java.awt.*;
public class TruncatedTooltip {
public static void main(String[] args) {
// Demonstrate that the tooltip contents are truncated when the tooltip is lightweight (entirely within the window bounds) on Windows HiDPI displays
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JButton button = new JButton("toggle height");
button.setToolTipText("<html>Some tooltip text<html>");
JFrame frame = new JFrame();
frame.getContentPane().setLayout(new FlowLayout());
frame.getContentPane().add(button);
frame.setSize(400,200);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setVisible(true);
button.addActionListener(e -> frame.setSize(300,frame.getHeight()<200?200:40));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Click the button which decreases the size of the window enough such that the tooltip needs to extend outside of the window bounds. It displays correctly as a heavy weight tooltip.
This bug does not happen under Java 9.
This bug does not happen if the Windows look and feel is not set.
FREQUENCY : always
- backported by
-
JDK-8251873 Windows HiDPI html lightweight tooltips are truncated
- Resolved
-
JDK-8252917 Windows HiDPI html lightweight tooltips are truncated
- Resolved
-
JDK-8254121 Windows HiDPI html lightweight tooltips are truncated
- Resolved
-
JDK-8257156 Windows HiDPI html lightweight tooltips are truncated
- Resolved
-
JDK-8252958 Windows HiDPI html lightweight tooltips are truncated
- Closed
- duplicates
-
JDK-8213786 Incorrect size of tooltips on scaled displays
- Closed
- relates to
-
JDK-8178025 HiDPI with non-integer scale factor - SPANs in HTML are rendered overlapping each other
- Resolved