小编use*_*763的帖子

javaFX应用程序启动错误

我刚接触javaFX,最近在通过Eclipse运行应用程序时遇到了以下错误.我的代码:

import javafx.scene.Scene;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;

public class WindowBetaV02 extends AbstractWindow{

    public static void main(String[] args){
        launch(args);
    }

    public void start(Stage mainStage){
        height = 480;
        width = 640;
        mainStage = new Stage();
        mainStage.setTitle("AMQ");
        mainStage.setScene(drawGUIGameNormal());
        mainStage.setResizable(false);
        mainStage.show();
    }

    private Scene drawGUIGameNormal(){
        //Draw gui
    }
}

import javafx.application.Application;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.RowConstraints;
import javafx.stage.Stage;

public abstract class AbstractWindow extends Application {
    protected int height;
    protected int width;
    protected GameFunctions controller;

    public abstract void …
Run Code Online (Sandbox Code Playgroud)

javafx-2

5
推荐指数
1
解决办法
1499
查看次数

标签 统计

javafx-2 ×1