-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
b11
-
x86
-
windows_2000
Name: jl125535 Date: 11/25/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
FULL OPERATING SYSTEM VERSION :
Windows 2000 professional
A DESCRIPTION OF THE PROBLEM :
After closing print dialog (either clicking OK or Cancel),
the main application loses the focus. Other application in
the machine gains the focus, and hide the java application.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the code attached
2. Closing the print dialog either clicking OK or cancel
3. Note that the main application loses the focus. Other
application in the machine gains the focus, and hide the
java application.
EXPECTED VERSUS ACTUAL BEHAVIOR :
The java application should still be the one on focus
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.print.*;
import javax.swing.*;
class Test2 {
public static void main(String[] args) {
JFrame myFrame = new JFrame("Test");
myFrame.setSize(new Dimension(200,200));
myFrame.setVisible(true);
//Users supplied code
PrinterJob prnJob = PrinterJob.getPrinterJob();
if (prnJob.printDialog())
{ try
{ prnJob.print();
}
catch (PrinterException exception)
{
}
}
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
use requestfocus()
(Review ID: 145492)
======================================================================
Name: jl125535 Date: 11/25/2002
When the Print dialog is dismissed using either OK or Cancel, the
application JFrame drops to one window from the top in the windows
application z-order.
(Review ID: 145677)
======================================================================
- relates to
-
JDK-4785920 Regression of 4273333 in hopper
- Closed
-
JDK-4514422 main focus lost after closing PrinterJob.pageDialog or PrinterJob.printDialog
- Closed