Remove Netbeans Auto Generated Code After Double-Clicking an Object in Design Tab

In the Design mode you select the particular object and click Events under Properties and remove the event from the event property


To answer Brian's question on the more general case:

If you have auto-generated variables that are hiding in the Design mode, and you cannot select and remove them, you can usually delete them with the following steps(in NetBeans7.4):

  1. Go in the Design mode to the top window menu -> Windows -> Navigator. You will see Group "Navigator" popped up on the left (usually).
  2. Now you can delete unwanted variables (or edit them) with the right click menu.