You figure importing a non-Eclipse project into Eclipse was easy, so is NetBeans. Ironic but when I tried to do so in NetBeans, it took me some time to figure it out.

To do so, just go to File menu and select New Project.


Under “Categories” select “Java”

Under “Projects” select “Java Project with Existing Sources”

Then set the folder where your source files are located.

That’s it!

If you encounter this problem in Netbeans, chances are you enabled the option “Compile on Save”. I do not know why this occurs because there are some cases where I enable this problem and I do not encounter the same error.

To do so, do the following:

  • Right click project name, choose Properties
  • Go to Build > Compiling
  • Click “Compile on Save”

That should do the trick.

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?

Related Posts Plugin for WordPress, Blogger...