我使用Caliburn.Micro并使用ErrorHandler.Handle(ex)
添加了我自己的ErrorHandler。这就是它的样子:
An exception of type 'System.NullReferenceException' occurred in SampleProject.exe but was not handled in user code
Additional information: Object reference not set to an instance of an object.
在其他地方:
JButton
现在发生了一些异常,JPanel
开始发挥作用。但是,它抛出了这个错误:
panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
panel.setPreferredSize(new Dimension(130, 300));
panel.add(jlabel1);
panel.add(jlabel2);
panel.add(button, BorderLayout.SOUTH);
TBH,我现在还不知道从哪里开始调查......?