Netbeans Container deletion operation fails to perform properly?

I'm trying to delete a JPanel from my mailPanel under [FrameView] in Netbeans??! When I delete this JPanel it just deletes this from Inspector view, it does not unlink and delete all the components it has auto-generated as a result of creating those controllers inside the JPanel and the JPanel itself and leaves my initial code with all the rubbish that were meant to be deleted. What should I do to safely delete everything associated with this JPanel deletion??! Please help!
snajalmAsked:
Who is Participating?
 
snajalmConnect With a Mentor Author Commented:
I got the answer from this link which helped remove the faulty action!

http://bytes.com/topic/java/answers/856301-how-edit-grayed-out-area-gui-netbeans

This is an old topic, but it comes up high in google searches, so here's how I solved the problem:

The original poster was looking to delete event handlers that were automatically created by NetBeans, but that were no longer needed. You can't do this by editing code; you do it through the GUI like so:

1) Go to the "Design" pane and select the component whose handlers you want to remove

2) On the right hand side of the NetBeans screen, look at the "Properties" window, and select "Events"

3) Find the event you want to remove in the list, hit the ellipsis "...", and use the panel that pops up to remove the event handler you don't want anymore. The auto-generated code will be removed.

I found this information here: http://www.qtp.ufl.edu/slaterlab/hpc...e/visual39.htm 
0
 
CEHJCommented:
You haven't by any chance edited auto-generated code have you?
0
 
for_yanCommented:

http://forums.netbeans.org/ntopic16161.html

Open the inspector and delete the variables there.
This will also delete variables from the code (if you haven't added the
code manually by adding "user defined code" in the UI elements).
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
snajalmAuthor Commented:
No!  not at all!  Is that possible though??!
0
 
CEHJCommented:
>>Is that possible though??!

Well yes, but don't even think about it ;)
0
 
snajalmAuthor Commented:
I know but can you please let me know how, because I can see for some reason the action method related to one of my jButtons has become part of encrypted autho-generated field.  I need to turn this feature off for that specific line so that the system is not confused.  I may need to remove that method manually and leave the rest to the automatic delete operation!
0
 
for_yanCommented:
Go to the inspector and delete the variables associated with jbuttons form there - it should delete the code.
0
 
CEHJCommented:
You don't need to edit it to do that and mustn't. Just set a new Action to the button using your own code. The auto one will be replaced
0
 
snajalmAuthor Commented:
I did try to create a new action but it didn't do anything in regards to removing the previous action.  I have included an image file showing what has happened to the event which is pretty awkward.  The auto is confused on which part of this code should be protected and which part shouldn't.  That's why it can't change anything in regards to this controller!
untitled.bmp
0
 
snajalmAuthor Commented:
Many thanks to CEHJ and for_yan for their support!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.