bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/30337] NPE with own JComboBox if editor nis null


From: roman at kennke dot org
Subject: [Bug swing/30337] NPE with own JComboBox if editor nis null
Date: 5 Jan 2007 22:49:48 -0000


------- Comment #4 from roman at kennke dot org  2007-01-05 22:49 -------
May I add that this code does not work with Sun's VM for me. I am trying both
JDK5 and JDK6 and get an NPE with the following program:

import javax.swing.*;
public class TestComboBox {

public static void main(String[] args)
{
 JFrame frame = new JFrame();
 JComboBox comboBox = new JComboBox() {
     public ComboBoxEditor getEditor() {
       return null;
     }
   };
         comboBox.addItem("Mark");
         comboBox.addItem("Jasper");
         comboBox.addItem("Wielaard");
         comboBox.setEditable(true);
         frame.getContentPane().add(comboBox);
         frame.pack();
         frame.setVisible(true);}
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30337





reply via email to

[Prev in Thread] Current Thread [Next in Thread]