I'ce spent a few hours creating a short self contained example. To reproduce this bug. Run the following in debug in eclipse with a breakpoint as directed in the code.
JComboBox<String> combo = new JComboBox<>();
JFrame jf = new JFrame();
jf.setExtendedState(JFrame.MAXIMIZED_BOTH);
jf.getContentPane().add(combo);
combo.addItem("Test 1");
combo.addItem("Test 2");
combo.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
//Put break point here to crash your system
System.out.println("Test");
}
});
jf.setVisible(true);
jf.pack();
I'ce spent a few hours creating a short self contained example. To reproduce this bug. Run the following in debug in eclipse with a breakpoint as directed in the code.
import java.awt. event.ActionEve nt; event.ActionLis tener;
import java.awt.
import javax.swing. JComboBox;
import javax.swing.JFrame;
public class WillCrash {
public static void main(String[] args) {
JComboBox<String> combo = new JComboBox<>(); dState( JFrame. MAXIMIZED_ BOTH); Pane(). add(combo) ; addItem( "Test 1"); addItem( "Test 2"); addActionListen er(new ActionListener() {
JFrame jf = new JFrame();
jf.setExtende
jf.getContent
combo.
combo.
combo.
@Override (ActionEvent e) { out.println( "Test") ; (true);
public void actionPerformed
//Put break point here to crash your system
System.
}
});
jf.setVisible
jf.pack();
}
}