Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7081010

The fix of CR 6995769 should be revisited

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P2 P2
    • 6-pool
    • 6u27
    • client-libs
    • 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);
      }
      }
      );
          }
      }

            Unassigned Unassigned
            rupashka Pavel Porvatov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: