-
Bug
-
Resolution: Won't Fix
-
P2
-
6u27
-
generic
-
generic, solaris
See http://mail.openjdk.java.net/pipermail/awt-dev/2011-July/001810.html for details.
Try following a testcase. Upon running, this will bring up a small frame
and a JOptionPane. None of them renders for me, but after some blind
clicking in the option pane it throws exactly this NPE.
import java.awt.*;
import javax.swing.*;
public class TestRMNPE extends JLabel {
private TestRMNPE(String l) {
super(l);
}
public void paint(Graphics g) {
setText("Frak");
JOptionPane.showMessageDialog(null, "Don't do this");
}
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
JFrame f = new JFrame();
f.add(new TestRMNPE("Test"));
f.pack();
f.setVisible(true);
}
}
);
}
}
Try following a testcase. Upon running, this will bring up a small frame
and a JOptionPane. None of them renders for me, but after some blind
clicking in the option pane it throws exactly this NPE.
import java.awt.*;
import javax.swing.*;
public class TestRMNPE extends JLabel {
private TestRMNPE(String l) {
super(l);
}
public void paint(Graphics g) {
setText("Frak");
JOptionPane.showMessageDialog(null, "Don't do this");
}
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
JFrame f = new JFrame();
f.add(new TestRMNPE("Test"));
f.pack();
f.setVisible(true);
}
}
);
}
}
- relates to
-
JDK-6995769 occasion NPE thrown from SwingUtilities.computeIntersection()
-
- Closed
-