The sample data of the JTree when you drag it to your container always appear as color, sports and food. You cannot find this in the uneditable initComponents() method of the class file. Instead, go to the property list of the JTree class and do the following:
- go to the “model” property and you will see a [TreeModel] value
- click on the [TreeModel] to open a dialog
- under the Tree Model Editor dropdown you will see the sample data below
- delete everything on the left pane and click ok
That’s it. Pretty simple right?