I have created a bunch of custom nodes for my project, by subclassing existing ones.
For example:
package sample;
import javafx.scene.control.Button;
public class MyCustomButton extends Button {
public MyCustomButton() {
System.out.println("This is my custom button...");
}
}
This is working fine, I create a jar file and I can import it into Scenebuilder.
However if my custom node uses a resource, and I try to import the jar in Scenebuilder, the custom component won't show up in the Import Dialog.
package sample;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
public class MyCustomButton extends Button {
public MyCustomButton() {
Image image = new Image("sample/picture.gif");
System.out.println("This is my custom button...");
}
}
How can I convince Scenebuilder to import my custom components if they contain resources? The jar file has all the needed resources, and a component working fine in code, but I would like to be able to use it in Scenebuilder as well.