I was working on a stage when I noticed I practically had the exact same thing three times. Rather than that (since I hate that), I decided to take what I had those 3 times
You do not need .jar file to do that. You can simply create new FXML file with that what you need ex. combo box. Create class file with extending combo box, controller and add controller in FXML file (in scene builder).
Find "Import from JAR/FXML file" in combo box near to left search box in scene builder and then select the file. Now you have new title pane in left accordion with name Custom. There you can find your components.
@edit There are files.
MyGridPane.fxml
MyGridPane.java
package MyGridPane;
import javafx.fxml.FXMLLoader;
import java.io.IOException;
/**
* Created by Marcin on 2014-09-01.
*/
public class MyGridPane {
MyGridPane(){
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("MyGridPane.fxml"));
fxmlLoader.setRoot(this); fxmlLoader.setController(this);
try {
fxmlLoader.load();
} catch (IOException exception) {
throw new RuntimeException(exception);
}
}
}
MyGridPaneController.java
package MyGridPane;
import javafx.fxml.Initializable;
import java.net.URL;
import java.util.ResourceBundle;
/**
* Created by Marcin on 2014-09-01.
*/
public class MyGridPaneController implements Initializable{
@Override
public void initialize(URL location, ResourceBundle resources) {
}
}
Next step is add to Scene Builder
and you can add this component.