import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class App14_5 extends Application {
@Override
public void start(Stage primaryStage) {
// 创建边界式面板对象
BorderPane rootPane = new BorderPane();
// 设置边界面板边缘内测空白距离均为10像素
rootPane.setPadding(new Insets(10));
Button bt = new Button("顶部工具条");
bt.setPrefSize(280, 20);
rootPane.setTop(bt);
rootPane.setBottom(new Button("底部状态栏"));
rootPane.setLeft(new Button("左侧导航菜单"));
rootPane.setRight(new Button("显示信息"));
rootPane.setCenter(new Button("中间工作区"));
Scene scene = new Scene(rootPane, 280, 130);
primaryStage.setScene(scene);
primaryStage.setTitle("边界式面板");
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}