在当前StackPane中启动另一个类程序?

时间:2015-09-23 06:38:35

标签: java user-interface javafx javafx-8

目前正在编写一个程序,用于在JavaFX中插入,搜索和更新数据库中的数据。

我真的希望在一个Panel中运行三个不同的任务。我有一个运行良好的插入类,但在调用时会打开一个新窗口。单击按钮后,如何使其在当前的Java堆栈窗格中运行?

如果需要可以发送图像。

代码

private Object ShowInsert() { 
    //trying to run ProcessGrades in the middle of the stack pane named
    MidStack ProcessGrades p1 = new ProcessGrades(); 
    Stage primaryStage = new Stage(); 
    p1.start(primaryStage);

    MidStack.getChildren().add(p1); //didnt work as p1 is not a node
    middle.setText("you clicked insert!"); 
    return null; 
}

0 个答案:

没有答案