use of javafx.fxml.FXMLLoader in project trex-stateless-gui by cisco-system-traffic-generator.
the class Initialization method initializeFXML.
public static void initializeFXML(Object object, String resourceName) {
FXMLLoader fxmlLoader = new FXMLLoader(object.getClass().getResource(resourceName));
fxmlLoader.setRoot(object);
fxmlLoader.setController(object);
try {
fxmlLoader.load();
} catch (IOException exception) {
throw new RuntimeException(exception);
}
}
Aggregations