58,452
社区成员




package hrms.controller;
import java.io.IOException;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class HrmsMainApp extends Application {
private Stage primaryStage;
private BorderPane rootLayout;
@Override
public void start(Stage primaryStage) {
this.primaryStage = primaryStage;
this.primaryStage.setTitle("");
initrootLayout();
}
public void initrootLayout() {
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(HrmsMainApp.class.getResource("hrms.view/RootLayout.fxml"));
rootLayout = (BorderPane) loader.load();
// Show the scene containing the root layout.
Scene scene = new Scene(rootLayout);
primaryStage.setScene(scene);
primaryStage.show();
} catch (IOException e) {
e.printStackTrace();
}
}
public Stage getPrimaryStage() {
return primaryStage;
}
public static void main(String[] args) {
launch(args);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.effect.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.BorderPane?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" type="BorderPane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<top>
<HBox alignment="BOTTOM_RIGHT" depthTest="ENABLE" prefHeight="80.0" prefWidth="1280.0" style="-fx-background-color: #336699;" BorderPane.alignment="CENTER">
<children>
<Button mnemonicParsing="false" text="Button">
<HBox.margin>
<Insets bottom="6.0" right="100.0" />
</HBox.margin>
</Button>
<Button contentDisplay="CENTER" mnemonicParsing="false" text="Button">
<HBox.margin>
<Insets bottom="6.0" right="100.0" />
</HBox.margin>
</Button>
</children></HBox>
</top>
<left>
<Accordion BorderPane.alignment="CENTER">
<panes>
<TitledPane animated="false" text="untitled 1">
<content>
<SplitPane prefHeight="200.0" prefWidth="200.0" />
</content>
<padding>
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
</padding>
</TitledPane>
<TitledPane animated="false" text="untitled 2">
<content>
<SplitPane prefHeight="200.0" prefWidth="200.0" />
</content>
</TitledPane>
</panes>
</Accordion>
</left>
<bottom>
<HBox prefHeight="40.0" prefWidth="1280.0" BorderPane.alignment="CENTER" />
</bottom>
<center>
<Pane BorderPane.alignment="CENTER">
<BorderPane.margin>
<Insets bottom="3.0" left="3.0" top="3.0" />
</BorderPane.margin></Pane>
</center>
</fx:root>