As of JavaFX Scene Builder 2.0 b7, you can permanently import custom controls into the library. Use the Library panel's pull-down menu (you can access it by clicking small down-arrow at the top of the library panel), and select "Import JAR/FXML file".
CSceneBuilder 2.0 doesn't include Custom Controls, but 1.0 and 1.1 doesn't work with JDK 8.0, what solution?
-
30-07-2022 - |
题
I have two own controls: 1. MyControl1 extends Pane 2. MyControl2 extends MyControl1
I create FXML file and add my controls by editing FXML from NetBeans.
After what i opened it from SceneBuilder 2.0 - and he doesn't see controls - so i added compiled jar with these controls.
On window with founded classes he show me both controls: MyControl1,MyControl2.
I set checkboxes and press OK.
But in custom controls i see only MyControl1, and on fxml form He show me only MyControl1, for MyControl2 (when i select them from hierarchy SceneBuilder tells me Selection contains unresolved reference.
Then i run application with fxml everything works fine.
解决方案
不隶属于 StackOverflow