1

When I create event-handling code for a component on a form, it shows up with grayed-background lines and a "do not edit" warning. They don't need to post the warning, because the code cannot be edited! However, I may (and have) goof by accidentally double-clicking a component, which inserts actionPerformed code in my main.java file.

I find that that grayed portion of the actionPerformed code can't be moved or deleted. Is there a secret ritual by which I can eliminate or move such code blocks?

John R Doner
  • 2,242
  • 8
  • 30
  • 36

1 Answers1

3

Go back into the form editor and simply delete the "xxxActionPerformed" out of the text box (in the list of possible event handlers).

Explained in slightly more detail here

Michael Myers
  • 188,989
  • 46
  • 291
  • 292
  • Thanks, that was exactly the ticket. I actually wish I could move these protected blocks around, just to improve the logical flow of my code, but I'll settle for the fact that I don't have to work out the whole event listener process. – John R Doner Jan 17 '10 at 16:35