package pro.simpleproject.core.primary;

import javafx.fxml.FXMLLoader;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;

public class PrimaryPaneBuilder {

	private static BorderPane pane;

	public static BorderPane getPane() {
		return pane;
	}

	public static Pane build() {
		try {
			pane = (BorderPane) FXMLLoader.load(PrimaryPaneBuilder.class.getResource("primary.fxml"));
			AnchorPane root = new AnchorPane(pane);
			AnchorPane.setLeftAnchor(pane, 3.0);
			AnchorPane.setRightAnchor(pane, 3.0);
			AnchorPane.setTopAnchor(pane, 3.0);
			AnchorPane.setBottomAnchor(pane, 3.0);
			root.getStyleClass().add("base");
			return root;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}

@@ -69,47 +69,8 @@
 er;%0A
-import javafx.scene.layout.AnchorPane;%0A
 impo
@@ -104,16 +104,16 @@
 erPane;%0A
+
 import j
@@ -236,20 +236,16 @@
 Pane get
-Pane
 () %7B%0A%09%09r
@@ -305,27 +305,26 @@
 %0A%09%09%09
-pane = (BorderPane)
+FXMLLoader f = new
  FXM
@@ -334,13 +334,8 @@
 ader
-.load
 (Pri
@@ -393,261 +393,39 @@
 %0A%09%09%09
-AnchorPane root = new AnchorPane(pane);%0A%09%09%09AnchorPane.setLeftAnchor(pane, 3.0);%0A%09%09%09AnchorPane.setRightAnchor(pane, 3.0);%0A%09%09%09AnchorPane.setTopAnchor(pane, 3.0);%0A%09%09%09AnchorPane.setBottomAnchor(pane, 3.0);%0A%09%09%09root.getStyleClass().add(%22base%22);%0A%09%09%09return root
+pane = f.load();%0A%09%09%09return pane
 ;%0A%09%09

Update PrimaryPaneBuilder.java