JDK-4391493 : Specifying DestinationType.FILE or DialogType.NONE in tk.getPrintJob ignored
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2000-11-21
  • Updated: 2001-01-02
  • Resolved: 2000-12-19
Related Reports
Duplicate :  
Relates :  
Description
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();
  }

}

Comments
EVALUATION This bug was introduced by 2D when they turned off all of my code and routed everything through their code. It should be fixed by now. Reassigned to 2D so that they can verify and close it. david.mendenhall@east 2000-12-19 ================================= Dup of 4338004
19-12-2000