#42 bug resize window fix
This commit is contained in:
parent
f452b73233
commit
f22ef61d3c
|
@ -62,15 +62,17 @@ public class MainFXMLController implements Initializable {
|
|||
* @throws IOException exception when file does not exist
|
||||
*/
|
||||
public void loadPane(String fxmlFile) throws IOException {
|
||||
//ToDo HGrow and VGrow of new node
|
||||
Node node;
|
||||
AnchorPane anchorPane;
|
||||
FXMLLoader loader = new FXMLLoader(Objects.requireNonNull(HelloApplication.class.getResource(fxmlFile)));
|
||||
node = (Node)loader.load();
|
||||
anchorPane = loader.load();
|
||||
if(fxmlFile.equals("MyPlants.fxml")) {
|
||||
MyPlantsController myPlantsController = loader.getController();
|
||||
myPlantsController.getMainController(this);
|
||||
}
|
||||
mainPane.getChildren().setAll(node);
|
||||
mainPane.getChildren().setAll(anchorPane);
|
||||
anchorPane.prefWidthProperty().bind(mainPane.widthProperty());
|
||||
anchorPane.prefHeightProperty().bind(mainPane.heightProperty());
|
||||
|
||||
}
|
||||
|
||||
private void styleChangeButton(Button button) {
|
||||
|
|
Loading…
Reference in New Issue