I use the Alt-Tab to move from netbeans to another application and then back to Nebeans.
When I do this fast, the focus does not always remain in the netbeans editor.As a result when I am start writing I
perform random operations from the top menus (because of the key bindings that they have)
I use java 6.
Unfortunately this is JDK bug, see issue 73960
*** This issue has been marked as a duplicate of 73960 ***