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

1.5.0_10 focus is not correctly returned to a JFrame

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      generic
    • OS:
      windows_xp

      Description

      Focus does not get correctly returned to a JFrame after opening java.awt.PrinterJob.printDialog(). Focus incorrectly returns to the Browser window instead.
       
      To reproduce:
      1. Make an applet with a JButton. (Or load the applet in the attached test case)
      2. Make this JButton open a JFrame. (Click on the JButton that says: "click here to open frame")
      3. The JFrame should now be open.
      4. Put a JButton on this JFrame, and make this JButton open a java.awt.PrinterJob.printDialog(). (Click on JButton labeled: "click here to print")
      5. This will open a JDialog (In the test case it is titled: "Confirmation Needed - Print")
      6. In the test case, Click Yes on the JDialog
      7. From this point a Windows Print Manager window will open.
      8. The customer reports whether you click OK or Cancel, the focus will be on the browser window, not the JFrame you opened in step 2/3.

      In my testing, I notice that choosing OK on the Windows Print Manager, focus goes to the browser for a split second and then returns back to the JFrame. If you Cancel the Windows Print Manager, focus will incorrectly return back to the Browser window.

      You can also reproduce a very similar behaviour by
      Doubleclick the Java icon in the Windows system tray to display Java
      Plugin version information. When you click OK to this window, the focus is
      incorrectly returned to the browser window, and not to the JFrame opened in
      step 2.

      I have seen this problem with:
      1.5.0_10 (build 1.5.0_10-b20061128)
      1.5.0_10 (build 1.5.0_10-b03)
      1.5.0_11 (build 1.5.0_11-b03)

      The problem does not occur with 1.4.2_13 or 1.6.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              raginip Ragini Prasad (Inactive)
              Reporter:
              mhmccart Mary Mccarthy
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: