This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Create a new "JavaFx>Empty FXML" file : - no controller class - use an existing style sheet The generated fxml file is as follows: ... <AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" styleClass="mainFxmlClass" xmlns:fx="http://javafx.com/fxml/1"> <stylesheets> <URL value="@test.css"/> </stylesheets> </AnchorPane> As you can see, the AnchorPane setting includes the property styleClass="mainFxmlClass" that should not be there.
Changed Priority to P4, because "the issue has a clear and efficient workaround" I think the command should be renamed from "New Empty FXML file" to "New FXML file". It seemed to me that including an empty styleClass (.mainFxmlClass) was an intentional part of the template, and I have been using it. The styleClass in the FXML file maps to the one generated in the .css file. Jerome, isn't this is a feature, or am I missing some potential downside of this feature/bug.
Indeed, if in the fxml creation wizard you are selecting the "Create New" stylesheet, a .css is created, with and empty mainFxmlClass. So it can make sense to add this rule on the root node. But in this issue, we are using an *existing* stylesheet. In this case there is no reason to add such a css rule.