更新了中央显示

lyq
LYQ 7 months ago
parent 05dbc0b18a
commit c842e7f94f

@ -15,22 +15,25 @@ public class MainApp extends Application {
private Stage primaryStage;
private BorderPane rootLayout;
// start 方法修改后
@Override
public void start(Stage primaryStage) {
this.primaryStage = primaryStage;
this.primaryStage.setTitle("小初高数学学习软件");
initRootLayout();
showLoginView();
this.primaryStage.centerOnScreen();
this.primaryStage.show();
}
public void initRootLayout() {
try {
FXMLLoader loader = new FXMLLoader(MainApp.class.getResource("view/RootLayout.fxml"));
rootLayout = loader.load();
Scene scene = new Scene(rootLayout);
primaryStage.setScene(scene);
primaryStage.show();
//primaryStage.show();
} catch (IOException e) {
e.printStackTrace();
}

Loading…
Cancel
Save