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

Tab key hangs in Native Print Dialog on win32

    XMLWordPrintable

Details

    • mantis
    • x86
    • windows_2000
    • Verified

    Description

      Tab key and short-cut keys does not work in Native Print Dialog on windows 2000 with swing components. This bug exists in Merlin also.

      ===============================================================================
      //PrintTest.java
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;

      public class PrintTest extends JFrame implements ActionListener {

      JButton b;
      JobAttributes jbattrib;
      Toolkit tk ;
      PageAttributes pgattrib;

          public PrintTest() {
              setTitle("PrintTest");
              setSize(500, 400);
              addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent we) {
                      System.exit(0);
                  }
              });

              b = new JButton("Print");
              jbattrib = new JobAttributes();
              tk = Toolkit.getDefaultToolkit();
              pgattrib = new PageAttributes();
      getContentPane().setLayout(new FlowLayout());
              getContentPane().add(b);

              b.addActionListener(this);

          }

          public void actionPerformed(ActionEvent ae) {
              if(ae.getSource()==b)


      jbattrib.setDialog(JobAttributes.DialogType.NATIVE);
      PrintJob pjob = tk.getPrintJob(this, "Printing Test",
                                                              jbattrib, pgattrib);

          }

          public static void main(String[] args) {
              PrintTest test = new PrintTest();
              test.setVisible(true);
          }


      }

      ===============================================================================

      Steps to reproduce:
      1. Compile and run the above program on windows
      2. Click on the "Print" Button.
      3. Native Print Dialog comes up.
      4. Try to press tab to select anything on the print dialog.
      5. There will be no response on the print dialog
      6. Press Alt+tab to focus some other window and again back to Print dialog.
      7. Press tab, it works now.


      The bug is not reproducible with the AWT components (Frame and Button) and with the COMMON Print Dialog.

      Attachments

        Issue Links

          Activity

            People

              son Oleg Sukhodolsky (Inactive)
              asamjisunw Aruna Samji (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: