-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.2
-
x86
-
windows_2000
Name: dk106046 Date: 07/07/2003
1st time focus problem with Print dialog:
Print dialog never gets the focus for the first time, but consecutive invocation will get the focus.
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
And
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b16)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b16, mixed mode)
1) Testcase :-
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.print.*;
public class PageSetup {
static PageFormat mPageFormat;
static PrinterJob job;
public static void main(String s[]) {
JFrame frame = new JFrame("PageSetup");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
JMenuItem pageSetupItem = new JMenuItem("Page Setup");
pageSetupItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if ( job == null )
job = PrinterJob.getPrinterJob();
if (mPageFormat == null) {
mPageFormat = job.defaultPage();
}
mPageFormat = job.pageDialog(mPageFormat);
}
});
JMenu printMenu = new JMenu("Print");
printMenu.add(pageSetupItem);
JMenuBar menuBar = new JMenuBar();
menuBar.add(printMenu);
frame.setJMenuBar(menuBar);
JLabel emptyLabel = new JLabel("");
emptyLabel.setPreferredSize(new Dimension(175, 100));
frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
}
}
2) STEPS TO REPRODUCE :-
1) Compile AND run the above testcase.
2) A dialog box appears,click on the menu
3) A Page setup dialog appers.
4) But that dialog doesn't have any items selected.which is causing
the tab keys not to cycle through the dialog objects..
[This bug is being submitted as a courtesy, in order to maintain uniformity between Sun & IBM JDKs. It has been fixed in IBM JDKs. Please contact ###@###.### if you have questions.]
======================================================================
1st time focus problem with Print dialog:
Print dialog never gets the focus for the first time, but consecutive invocation will get the focus.
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
And
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b16)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b16, mixed mode)
1) Testcase :-
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.print.*;
public class PageSetup {
static PageFormat mPageFormat;
static PrinterJob job;
public static void main(String s[]) {
JFrame frame = new JFrame("PageSetup");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
JMenuItem pageSetupItem = new JMenuItem("Page Setup");
pageSetupItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if ( job == null )
job = PrinterJob.getPrinterJob();
if (mPageFormat == null) {
mPageFormat = job.defaultPage();
}
mPageFormat = job.pageDialog(mPageFormat);
}
});
JMenu printMenu = new JMenu("Print");
printMenu.add(pageSetupItem);
JMenuBar menuBar = new JMenuBar();
menuBar.add(printMenu);
frame.setJMenuBar(menuBar);
JLabel emptyLabel = new JLabel("");
emptyLabel.setPreferredSize(new Dimension(175, 100));
frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
}
}
2) STEPS TO REPRODUCE :-
1) Compile AND run the above testcase.
2) A dialog box appears,click on the menu
3) A Page setup dialog appers.
4) But that dialog doesn't have any items selected.which is causing
the tab keys not to cycle through the dialog objects..
[This bug is being submitted as a courtesy, in order to maintain uniformity between Sun & IBM JDKs. It has been fixed in IBM JDKs. Please contact ###@###.### if you have questions.]
======================================================================
- relates to
-
JDK-4688591 Tab key hangs in Native Print Dialog on win32
-
- Closed
-