When the cursor moves on a dialogue and press "alt" key,
Thej ava.lang.NullPointerException exception occurs both in 1.4.2fcs
and 1.5(b14).
This issues does not occurs in 1.4.1_0X.
It seems regression.
Configration:
OS Windows2000/WindowsXP, both are japanese edition.
Reproduce:
1) Compile the attached test Case.
2) Invoke " java Test'
3) Click the "dialog" button in opened window and
you will see a dialog appears.
4) Move the pointer in the dialog and press the "alt" key.
The exception in the attached file "log-1.5b14.txt" will show up.
Test Case:
==== Test.java =====>
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Test extends JFrame implements ActionListener {
public JButton button = new JButton("Dialog");
public Test() {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLoo
kAndFeel");
setSize(300,300);
getContentPane().setBackground(Color.white);
getContentPane().setLayout(null);
getContentPane().add(button);
button.setBounds(100,100,100,50);
button.addActionListener(this) ;
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
} catch (Exception ex) {
System.out.println(ex);
}
}
public void actionPerformed(ActionEvent e) {
Dialog dialog = new Dialog(this,true);
dialog.setSize(200,200);
dialog.show();
}
public static void main(String[] argv) {
Test test = new Test();
test.show();
}
}
<=== Test.java =====
==============================================================================