Skip to content

Commit 7679650

Browse files
committed
8231231: The printing result is different from the case instruction
Reviewed-by: prr
1 parent f7c59c6 commit 7679650

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/jdk/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,6 @@ java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.html 8203867 m
907907
java/awt/Frame/FrameStateTest/FrameStateTest.html 8203920 macosx-all,linux-all
908908
javax/swing/SwingUtilities/TestTextPosInPrint.java 8227025 windows-all
909909
java/awt/print/PrinterJob/ScaledText/ScaledText.java 8231226 macosx-all
910-
java/awt/print/bug8023392/bug8023392.html 8231231 generic-all
911910
java/awt/font/TextLayout/TestJustification.html 8250791 macosx-all
912911
javax/swing/JTabbedPane/4209065/bug4209065.java 8251177 macosx-all
913912
java/awt/TrayIcon/DragEventSource/DragEventSource.java 8252242 macosx-all

test/jdk/java/awt/print/bug8023392/bug8023392.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
public class bug8023392 extends Applet {
4848
static final String[] instructions = {
49+
"Please select the RadioButton for applet size labeled \"variable\" radiobutton in test harness window.",
4950
"A Frame containing several pairs of labels ((a) and (b)) is displayed.",
5051
"Labels of each pair look the same and are left-aligned (with spaces ",
5152
"between chars).",
@@ -169,7 +170,9 @@ public int print(Graphics graphics,
169170
if (pageIndex >= 1) {
170171
return Printable.NO_SUCH_PAGE;
171172
}
172-
173+
double imgX = pageFormat.getImageableX();
174+
double imgY = pageFormat.getImageableY();
175+
((Graphics2D)graphics).translate(imgX, imgY);
173176
this.paint(graphics);
174177
return Printable.PAGE_EXISTS;
175178
}

0 commit comments

Comments
 (0)