I created a form with default NetBeans edito and put a jTree
on it.
It somehow then creates bunch of elements such as \"colors\", \"sports\", \"food\" in there.
Initialize your JTree inside the custom GUI initializer createUIComponents() method.
To create custom GUI initializer source code for a certain component, follow this general procedure:
Select the desired component.
In the Inspector, check the option Custom Create.
In the text editor, locate the method createUIComponents(), and type the desired source code. The code in this method will not be removed on compilation.
Full explanation: https://www.jetbrains.com/help/idea/creating-form-initialization-code.html