On 7/28/2011 10:34 PM, Roman Kennke wrote:
Find attached 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.

Showing a modal dialog from paint() is very artificial, isn't it? :) Given how complex Swing painting code is, I doubt we'll be able to reliably support scenarios like this. But in general, I agree, the current Pavel's fix doesn't look robust and actually hide the real problem, making it even harder to debug.

Thanks,

Artem

Regards, Roman


Am Donnerstag, den 28.07.2011, 20:22 +0200 schrieb Mario Torre:
2011/7/28 Artem Ananiev<[email protected]>:

+1

Yeah, I agree with Roman, IllegalStateException sounds like the
perfect option to me.

Cheers,
Mario

Reply via email to