This was brought up a while back, was fixed but not anymore. A button that registers an ActionListener that removes the button from its parent will cause NPE's to be thrown when you click on it. Test case attached.
Created attachment 6713 [details] Test case for bug.
I'm thinking this is caused by the MOUSE_RELEASED event having nowhere to go. Kim, can this be fixed in the same way that you fixed JToolTip, by disabling mouse events on a component when it is removed?
I just tested it. The MOUSE_RELEASED event does go to the button that was removed.
Oops nevermind. I messed up my test case. Tom is correct. The mouse event just doesn't get dispatched if the component is no longer in the heirarchy.
fixed in java-gui-branch
All of these are all fixed in 4.0.0 by the merge of the gui branch.