JComboBox does not trigger actionPerformed() when there is an exception on the AWT-EventQueue-0 thread <pre><code> //This is my test class Public class crazySwing extends JFrame { private DefaultListModel model; public crazySwing() { initUI(); } private void initUI() { Vector v= new Vector(); v.add(1); v.add(2); //comboxbox with 2 items JComboBox test = new JComboBox(v); test.addActionListener(new ClickAction()); createLayout(test); setLocationRelativeTo(null); setDefaultCloseOperation(EXIT_ON_CLOSE); } private void createLayout(JComponent... arg) { JPanel pane = (JPanel) getContentPane(); GroupLayout gl = new GroupLayout(pane); pane.setLayout(gl); pane.setToolTipText("Content pane"); gl.setAutoCreateContainerGaps(true); gl.setHorizontalGroup(gl.createSequentialGroup() .addComponent(arg[0]) .addGap(200) ); gl.setVerticalGroup(gl.createSequentialGroup() .addComponent(arg[0]) .addGap(120) ); pack(); } public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { @Override public void run() { crazySwing ex = new crazySwing(); ex.setVisible(true); } }); } private class ClickAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { System.out.println("testing on exception"); //This will trigger a null Pointer exception List test = null; test.get(0); } } } </code></pre> <p>Hi guys, I'm working on a Java rich client and I encountered the above symptom. When the JComboBox is clicked for the first time, a null pointer exception will be thrown by the code and then, when I try clicking on the JComboxBox again, actionPerformed() is not triggered. </p> <p>I have tried it on a JButton but it won't happen to a JButton.</p> <p>This is not a question about how to resolve a NPE. Kindly read the posting title.</p>