-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
sparc
-
solaris_8
Given the following test code below, a printer dialog always appears.
Happens on both Solaris and Windows.
NOTE: DialogType.NONE
NOTE: DestinationType.FILE
There are two misbehaviors. First, even though DialogType.NONE is
specified, a dialog does appear. Second, the dialog that appears
doesn't have "Print To File" checked, and the file name to print to
is not filled in with the file name specified in the code below.
import java.awt.*;
public class prtrial extends Frame {
public prtrial() {
super("prtrial");
setSize(300,300);
show();
setVisible( true);
doit();
}
public void doit() {
Toolkit tk = Toolkit.getDefaultToolkit();
JobAttributes ja = new JobAttributes();
// getDialog == JobAttributes.DialogType.NONE
PageAttributes pa = new PageAttributes();
ja.setDestination(JobAttributes.DestinationType.FILE);
ja.setFileName("jn-finalize");
ja.setDialog(JobAttributes.DialogType.NONE);
PrintJob pj = tk.getPrintJob( this, "finalize", ja, pa);
pj.finalize();
}
public static void main(String[] args) {
new prtrial();
}
}
- duplicates
-
JDK-4338004 In Windows and Solaris, printjob pops up only the native dialog.
-
- Closed
-
- relates to
-
JDK-4374956 Toolkit.getPrintJob incorrectly throws HeadlessException in headless mode
-
- Closed
-