小编Fir*_*bah的帖子

javafx:javafx.scene.layout.AnchorPane无法强制转换为javafx.scene.layout.BorderPane

嗨,大家好我早知道JavaFX和我试图施放BorderPane到anchronPane,同时由于发生错误,我不知道该怎么办,我是下面的教程,请帮助

import java.io.IOException;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class MainApp extends Application {

    private Stage primaryStage;
    private BorderPane rootLayout;

    @Override
    public void start(Stage primaryStage) {
        this.primaryStage = primaryStage;
        this.primaryStage.setTitle("AddressApp");

        initRootLayout();
        showPersonOverview();
    }

    /**
     * Initializes the root layout.
     */
    public void initRootLayout() {
        try {
            // Load root layout from fxml file.
            FXMLLoader loader = new FXMLLoader();
            loader.setLocation(MainApp.class.getResource("view/RootLayout.fxml"));
            rootLayout = (BorderPane) loader.load();

            // Show the scene containing the root layout.
            Scene scene …
Run Code Online (Sandbox Code Playgroud)

java android javafx javafx-2

2
推荐指数
1
解决办法
9486
查看次数

标签 统计

android ×1

java ×1

javafx ×1

javafx-2 ×1