mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
26 lines
631 B
Java
26 lines
631 B
Java
package injected;
|
|
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.layout.VBox;
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
public class FooVBox extends VBox{
|
|
private void loaderCreation() {
|
|
MyController controller = new MyController();
|
|
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("injectedController.fxml"));
|
|
fxmlLoader.setRoot(this);
|
|
fxmlLoader.setController(controller);
|
|
|
|
try {
|
|
fxmlLoader.load();
|
|
} catch (IOException exception) {
|
|
throw new RuntimeException(exception);
|
|
}
|
|
}
|
|
public FooVBox() {
|
|
loaderCreation();
|
|
}
|
|
}
|