- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    7, 8
- 
        b102
- 
        os_x
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8041004 | 7u80 | Anton Nashatyrev | P3 | Resolved | Fixed | b01 | 
| JDK-8040383 | 7u60 | Anton Nashatyrev | P3 | Resolved | Fixed | b15 | 
| JDK-8029833 | 7u55 | Anton Nashatyrev | P3 | Closed | Fixed | b05 | 
                    FULL PRODUCT VERSION :
openjdk version " 1.8.0-internal "
OpenJDK Runtime Environment (build 1.8.0-internal-strunk_2013_04_24_12_17-b00)
OpenJDK 64-Bit Server VM (build 25.0-b28, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Mac OSX 10.8.2
A DESCRIPTION OF THE PROBLEM :
The preferred size of JLabels is incorrect when displayed on a Retina display, when using a non-default font size.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
To reproduce, execute the code given below on a retina and a non-retina display. On a retina display the label text is cut off.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JLabel should not be cut off on retina displays.
ACTUAL -
On a retina display the label text is cut off.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.WindowConstants;
public class JLabelDemo {
public static void main(String[] args) {
JFrame frame = new JFrame( " JLabel Demo " );
Container contentPane = frame.getContentPane();
contentPane.setLayout(new FlowLayout());
final JLabel label = new JLabel(
" This is a monstrous mmmmmega label text which will not fit " );
label.setBorder(BorderFactory.createEtchedBorder());
label.setFont(new Font(label.getFont().getName(), label.getFont().getStyle(), 11));
contentPane.add(label);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Increase the preferred width by a few pixels so JLabels are rendered large enough.
openjdk version " 1.8.0-internal "
OpenJDK Runtime Environment (build 1.8.0-internal-strunk_2013_04_24_12_17-b00)
OpenJDK 64-Bit Server VM (build 25.0-b28, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Mac OSX 10.8.2
A DESCRIPTION OF THE PROBLEM :
The preferred size of JLabels is incorrect when displayed on a Retina display, when using a non-default font size.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
To reproduce, execute the code given below on a retina and a non-retina display. On a retina display the label text is cut off.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JLabel should not be cut off on retina displays.
ACTUAL -
On a retina display the label text is cut off.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.WindowConstants;
public class JLabelDemo {
public static void main(String[] args) {
JFrame frame = new JFrame( " JLabel Demo " );
Container contentPane = frame.getContentPane();
contentPane.setLayout(new FlowLayout());
final JLabel label = new JLabel(
" This is a monstrous mmmmmega label text which will not fit " );
label.setBorder(BorderFactory.createEtchedBorder());
label.setFont(new Font(label.getFont().getName(), label.getFont().getStyle(), 11));
contentPane.add(label);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Increase the preferred width by a few pixels so JLabels are rendered large enough.
- backported by
- 
                    JDK-8040383 [macosx] JLabel preferred size incorrect on retina displays with non-default font size -           
- Resolved
 
-         
- 
                    JDK-8041004 [macosx] JLabel preferred size incorrect on retina displays with non-default font size -           
- Resolved
 
-         
- 
                    JDK-8029833 [macosx] JLabel preferred size incorrect on retina displays with non-default font size -           
- Closed
 
-         
- duplicates
- 
                    JDK-8020752 [macosx] Cursor position in JTextArea does not match insertion point in Retina displays -           
- Closed
 
-         
- relates to
- 
                    JDK-8014069 [macosx] Cursor Position in JTextfield wrong for non-default font size on retina displays -           
- Closed
 
-