Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6735296
Votes 0
Synopsis Regression: Common print dialog does not show the correct page orientation
Category java:classes_2d
Reported Against
Release Fixed 7(b54), 6u14(b04) (Bug ID:2174050)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs
Submit Date 08-AUG-2008
Description
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);
    }
}
Posted Date : 2008-08-08 10:11:02.0

Caused by fix for 6633656.
Posted Date : 2008-09-16 00:02:06.0
Work Around
N/A
Evaluation
The problem is introduced somewhere between 6u10-b12 and 6u10-b24 (I don't have other 6u10 build locally).
Posted Date : 2008-08-15 09:28:51.0

Regression caused by 6633656 fix.  Fix is to return code prior to fixing 6633656 and just check for null return from getDefaultAttributeValue.
Posted Date : 2009-03-12 20:05:00.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang