Duplicate :
|
The jdk7 b38 fix for 6584657 : GTK Look and Feel: Bugs in menu item layout made changes in SwingUtilities calculation of the width of text. This has lead to text in some UI components being clipped (and "..." displayed) where there ought to be enough space. In the example below using the standard print dialog, the word "Print" on the JButton is clipped, and on the second tab "Portrait" is clipped. import java.awt.print.*; import javax.print.attribute.*; public class PrtDlg { public static void main(String[] args) { PrinterJob pj = PrinterJob.getPrinterJob(); pj.printDialog(new HashPrintRequestAttributeSet()); } } In addition, I see something closely related when printing. I used the CardTest demo applet on both Solaris SPARC and on Linux and see button label clipping when selecting appletviewer's "Print" menu option. This started in JDK 7 b07 and is probably somehow caused by the fix for 6464003 : Text truncated in JLabel To reproduce run CardTest, press "Two" to relay out and then print. I've attached "ps" output from b06 and b07 so you can see the problem. NB prior to b07 AWT included MToolkit but I don't think this is related to that removal, since XAWT with b06 does not exhibit the problem.