Relates :
|
|
Relates :
|
|
Relates :
|
An application does not exit after printing is completed. This bug is occuring in merlin build 82 in solaris 8. It can be seen in the attached program. How to reproduce the bug : Compile and run the program. Close the program without doing anything. The program will exit cleanly. Now, run the application again and click on the print button. Click on the print button of the printdialog that comes up. Close the window. The frame gets closed but the application does not exit back to the command prompt. import java.awt.*; import java.awt.event.*; import java.awt.print.*; public class MultiplePrinting implements ActionListener{ final Frame TstFrm = new Frame("Test Frame"); Button PrnBtn = new Button("Print"); public static void main(String []args){ MultiplePrinting Mtp = new MultiplePrinting(); } public MultiplePrinting(){ TstFrm.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent we){ TstFrm.dispose(); } }); PrnBtn.addActionListener(this); TstFrm.add(PrnBtn,BorderLayout.SOUTH); TstFrm.setSize(100,100); TstFrm.setVisible(true); } public void actionPerformed(ActionEvent ae){ JobAttributes JbAtrb = new JobAttributes(); JbAtrb.setCopies(2); JbAtrb.setDialog(JobAttributes.DialogType.NATIVE); PrintJob PJ = Toolkit.getDefaultToolkit().getPrintJob( TstFrm,"Testing Multiple", JbAtrb,null); if (PJ != null){ Graphics G = PJ.getGraphics(); if (G != null){ G.setFont(new Font("Dialog", Font.BOLD, 16)); G.setColor(Color.black); G.drawString("Page 1" , 100, 40); } G.dispose(); } PJ.end(); PJ = null; } } ###@###.### 2001-10-16 I have inadvertently put the build as 82. The bug is reproducible in build 83 as well
|