1

I'm extremely new to development and running an IDE. I'm using NetBeans and I've searched for an answer so if this is answered somewhere else, please direct me.

I've seen it suggested elsewhere, and it sounded like a good idea so I'm trying to use ControlsFX, but I think I have done something incorrectly.

In my fxml document, I have:

<?import org.controlsfx.control.*?>

However, I'm getting an error:

"Package org.controlsfx.control does not exist."

I have downloaded the zip file from http://fxexperience.com/controlsfx/. I just don't know where to put it or unzip it, or do whatever needs to be done so that I can use it. Will someone point me in the right direction?

Ammon Nelson
  • 45
  • 2
  • 11
  • I did some more digging and found this: https://bitbucket.org/controlsfx/controlsfx/wiki/Contributing%20to%20ControlsFX#markdown-header-importing-into-ide Importing into IDE **Netbeans** 1. Make sure Gradle Support is installed 2. Choose File > Open Project and select ControlsFX root directory 3. Press Open Project button – Ammon Nelson May 05 '15 at 21:15
  • Is your comment an answer Ammon? Rather than posting comments, you can [self-answer your question](http://stackoverflow.com/help/self-answer) and (after some time) mark your answer correct. – jewelsea May 05 '15 at 22:34
  • Yes it's an answer. Sorry, still getting used to the format. :-) – Ammon Nelson May 05 '15 at 22:58

2 Answers2

2

The option that worked for me was to import it as a library

  1. Rightclick on your Project and select Properties

  2. Go to Libraries

  3. Click "Add Library..."

  4. Click "Create..."

  5. under the tabs "Classpath" and "Sources" add the controlsfx JAR

If you also want to see your new components in the javaFX Scenebuilder:

  1. In the Scenebuilder: Navigate to Library at the top left corner. There should be a small wheel at the right of the search text field

  2. Click that and select "JAR/FXML Manager"

  3. Select "Add Lbrary/FXML from file system" and then just select the controlxfx jar.

Now it should prompt you to confirm the new components and you're ready to use them.

Knebb
  • 21
  • 4
1

I did some more digging and found this: https://bitbucket.org/controlsfx/controlsfx/wiki/Contributing%20to%20ControlsFX#markdown-header-importing-into-ide

Importing into IDE

Netbeans

  1. Make sure Gradle Support is installed
  2. Choose File > Open Project and select ControlsFX root directory
  3. Press Open Project button

In addition, I found out that you need to add the jar files from the ControlsFX project to the project's properties>>Libraries>>Compile Tab

Ammon Nelson
  • 45
  • 2
  • 11