So I have a regular component extending from BorderPane
and I want to add it into some FXML code. I am getting java.lang.IllegalArgumentException: Unable to coerce SettingsTab to class javafx.scene.Node.
SettingsTab
extends BorderPane
:
public class SettingsTab extends BorderPane { ...
I am trying to include it like this:
<Tab fx:id="settingsTab" text="%ui.gui.settings.title" content="SettingsTab"/>
The FXML code and the class are in the same package/directory.
I am relatively new to FXML and not very familiar with the syntax, so I am not sure how to do this.
I can include FXML files like this, but I want to include a class file:
<Tab fx:id="scheduleTab" text="%ui.gui.schedule.title">
<fx:include source="ScheduleTab.fxml"/>
</Tab>