-
Bug
-
Resolution: Fixed
-
P2
-
5.0u10
-
b01
-
generic
-
windows_xp
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.
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.
- relates to
-
JDK-6189161 Print Dialogue should be modal in 1.4.2/5.0
- Resolved