package pro.simpleproject.core.primary;

import java.io.IOException;

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() throws IOException {
		pane = (BorderPane) FXMLLoader.load(PrimaryPaneBuilder.class.getResource("primary.fxml"));
		pane.getStylesheets().add(PrimaryPaneBuilder.class.getResource("primary.css").toExternalForm());
		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;
	}

}

@@ -38,37 +38,8 @@
 y;%0A%0A
-import java.io.IOException;%0A%0A
 impo
@@ -65,16 +65,16 @@
 Loader;%0A
+
 import j
@@ -335,29 +335,19 @@
 d() 
-throws IOException
+%7B%0A%09%09try
  %7B%0A
+%09
 %09%09pa
@@ -437,16 +437,17 @@
 l%22));%0A%09%09
+%09
 pane.get
@@ -533,24 +533,25 @@
 lForm());%0A%09%09
+%09
 AnchorPane r
@@ -578,16 +578,17 @@
 (pane);%0A
+%09
 %09%09Anchor
@@ -612,32 +612,33 @@
 r(pane, 3.0);%0A%09%09
+%09
 AnchorPane.setRi
@@ -651,32 +651,33 @@
 hor(pane, 3.0);%0A
+%09
 %09%09AnchorPane.set
@@ -700,16 +700,17 @@
 3.0);%0A%09%09
+%09
 AnchorPa
@@ -740,16 +740,17 @@
 , 3.0);%0A
+%09
 %09%09root.g
@@ -779,16 +779,17 @@
 se%22);%0A%09%09
+%09
 return r
@@ -793,14 +793,83 @@
 n root;%0A
+%09%09%7D catch (Exception e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09return null;%0A
 %09%7D%0A%0A%7D%0A

Update PrimaryPaneBuilder.java