Why doesn't JFoenix have the JFXTabPane
in the imported .jar
in scenebuilder?
This means when I try to open my .fxml
file with scenebuilder in intellij it gives me the .fxml
file is not a FXML document error.
Even after importing the entire JFoenix library in scenebuilder I won't be able to use it because it can't open it without the JFXTabPane.
I downloaded the most recent versions of SceneBuilder (17) and jfoenix (9.0.10) and dragged the jfoenix jar to the library pane in SceneBuilder to import it. The import completed, JFXTabPane was displayed in the library. When I tried to drag a JFXTabPane from the library catalog into a scene, scene builder started behaving oddly (it broke and did not render the scene being built correctly). So it JFXTabPane still doesn't work with SceneBuilder. I advise you file an report with jfoenix to ask them to fix the issue (they have an issue tracker on their github site).
The asker did note in comments that, under the setup they are using:
jfoenix 9 is displaying the JFXTabPane
That might be due to using a different version of SceneBuilder than the version 17 I used.
If you continue to have issues, just use a plain TabPane in your FXML document rather than a JFXTabPane. I looked at the source and, functionally they are the same, JFXTabPane inherits from TabPane. In your code, create a new JFXTabPane and replace the TabPane injected by scene builder with your new pane (setting the children and properties the same as the fxml), and you should be fine to design in SceneBuilder but still use a JFXTabPane in your actual app. It is a bit of a hack, but not too bad.
There may be similar issues with using other jfoenix controls in SceneBuilder (I don't know, I haven't tried them), but basic jfoenix controls like JFXButton appeared to work in SceneBuilder fine, so perhaps it is on the JFXTabPane which experiences these issues.
For further information on troubleshooting SceneBuilder custom component import, see the following document (though it may not assist in all cases):
The answer to which features a SceneBuilder import troubleshooting section.