This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Description: reproducible with coco, not reproducible with buzz steps to reproduce: 1. start IDE 2. create new Platform Independant Project or Java Platform Project New Wizard appears 3. press ESC (or Enter) nothing happens Evaluation: The reason the New Wizard does not respond to the ESC key or the Enter Key because the dailog looses its focus. As soon as you click on one of the components of the dialog to gain the focus, the dailog again responds to the key events. The fix for this is not trivial. Still investigating why the focus gets lost even though the code does set the focus to the Diagram Name text field in loadComponents() method of NewDiagramUI class. Workaround: Click on one of the components of the dialog to gain the focus, then click ESC or Enter key.
This is a bug in the focus management of jdk 1.5 that is fixed in jdk1.6. Thus it is reproducible for Coke on jdk1.5 and not reproducible on jdk1.6. The bug surfaced due to integration http://www.netbeans.org/source/browse/openide/dialogs/src/org/openide/WizardDescriptor.java?r1=1.15&r2=1.16 (specifically by adding of SwingUtilities.invokeLater() wrapping of wizard closing at "Line 1687") The test case illustrating the jdk bug is below. Considering that: - it is a jdk problem that doesn't exist in the next, publicly available, jdk version that is among target jdks for the EntPack - there is an available easy workaround (mentioned above pressing of "TAB") the issue is a candidate for "WONTFIX". ====================== import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * Run, click B0, click B1. * At this moment the dialog "D2" should be active * and the text field inside it should have focus. * Try typing something without explicit click on the text field. * Works fine with 1.6 and doesn't work with 1.5. */ public class Test { public static void main(String[] argv) { final Frame f = new Frame(); JButton b = new JButton("B0"); b.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new Dialog1(f).show(); } }); f.add(b); f.pack(); f.show(); } public static class Dialog1 extends JDialog { public Dialog1(final Frame owner) { super(owner, true); JButton b1 = new JButton("B1"); b1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SwingUtilities.invokeLater(new Runnable() { public void run() { new Dialog2(owner, "D2").show(); } }); SwingUtilities.invokeLater(new Runnable() { public void run() { dispose(); } }); } }); Panel p = new Panel(); p.add(b1); add(p); pack(); } } public static class Dialog2 extends JDialog { public Dialog2(Frame owner, String title) { super(owner, title, true); JTextField tf = new JTextField(); add(tf); pack(); tf.requestFocus(); } } } ==========================
I just tested this in coco and the esc and return buttons work fine. Note that I am on a Mac.
please, track coco status in bugster (bug # 6381521).
Bug is still reproducible in coke060821 with jdk1.5_06 under windows.
reproducible with jdk1.5
see also issue 86296
The New Diagram Wizard has been rewitten using NetBeans wizard dialog, so the ESC key does close the dialog as expected. This issue is considered fixed.
verified in ide-coco-061031_3-ml