Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6735296

Regression: Common print dialog does not show the correct page orientation

XMLWordPrintable

    • 2d
    • b54
    • x86
    • windows_xp
    • Verified

        This is reproducible with 6u10 b28 on Windows, but not reproducible with jdk6 b104. Print dialog shows the Orientation in Page Setup as 'Portrait' inspite of setting it to Landscape in PageAttributes. Also, the options 'Reverse Portrait' and 'Reverse Landscape' are shown disabled with jdk6 b104, but they are shown enabled with 6u10 b28.

        To reproduce, run the below code, click on the 'Print' button and select the 'Page Setup' tab in Print dialog.

        import java.awt.*;
        import java.awt.event.*;

        public class PrintTest {
            
            private static Frame f;
            
            public static void main(String[] args) {
                f = new Frame();
                f.setSize(100, 100);
                Button b = new Button("Print");
                b.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent event) {
                        JobAttributes job = new JobAttributes();
                        PageAttributes page = new PageAttributes();
                        job.setDialog(JobAttributes.DialogType.COMMON);
                        page.setOrientationRequested(PageAttributes.
                                                     OrientationRequestedType.LANDSCAPE);
                        PrintJob pj = Toolkit.getDefaultToolkit().getPrintJob(f, "Test", job, page);
                    }
                });
                f.setLayout(new FlowLayout());
                f.add(b);
                f.setVisible(true);
            }
        }
        Caused by fix for 6633656.

              jgodinez Jennifer Godinez (Inactive)
              gramachasunw Girish Ramachandran (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: