Issue
I am working in JAVA SE and I used netbeans pallete for creating JFrames. After some coding I saw my some frames have redundant unused attributes in unwriteable block:
for example
private javax.swing.JTextField methodNameField;
private javax.swing.JPanel methodsNamesTablePanel;
private javax.swing.JLabel nameLabel;
private javax.swing.JLabel nameLabel1;
private javax.swing.JButton nextButton;
private javax.swing.JComboBox packagesComboBox2; // unused
private javax.swing.JComboBox packagesComboBox3; // unused
private javax.swing.JComboBox packagesComboBox6; // unused
private javax.swing.JComboBox packagesComboBox7; // unused
I dont have idea how to clean up? I can't select this part of code because netbeans pallete automatic create this part of code unwriteable. I trying use Refactor -> Inspect and Transform but I don't find any there. Can anybody help with this issue?
Solution
Look in your navigator. You should see "Other Components" in the component tree. You can delete them from there. Right click the component and delete
If you don't see this window, go to Window->Navigator. Make sure you're in the design view
Answered By - Paul Samsotha