Hi all! I'm new to this forum and JAVA at large =)

My application:

I'm working on an app that connects to a remote mySQL DB, injects user input and in turn gets an auto-generated key back which is printed as a barcode. The functionality is working as it's supposed to - my problems started when I wanted to build a swing interface with NetBeans.

My problem:

I've spent hours building a nice interface in NetBeans and I love how easy it is to attach event actions to menu items and buttons etc. However, a lot of pregenerated code is created which can't be altered by the user (that would be me). As I call "frame0" (the default frame for my app, created with the new project) with the "add" method, NetBeans suddenly thinks my code string is pregenerated and marks it as thus. Now I can't delete the line, although it screws up my application! I have tried to delete the object to which the code is attached (jMenuItem), but the screen just blinks and the object stays alive. :confused:

In short: How do I delete code pregenerated by NetBeans?