Java 正在当前堆栈窗格中启动另一个类程序?

Java 正在当前堆栈窗格中启动另一个类程序?,java,user-interface,javafx,javafx-8,Java,User Interface,Javafx,Javafx 8,目前,我正在编写一个程序,用于在JavaFX中插入、搜索和更新数据库中的数据 我真的希望在一个面板中运行三个不同的任务。我有一个运行良好的insert类,但是调用它时会打开一个新窗口。单击按钮后,如何使其在当前java堆栈窗格中运行 如果需要,可以发送图像 代码 private Object ShowInsert() { //trying to run ProcessGrades in the middle of the stack pane named MidStack Pr

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

我真的希望在一个面板中运行三个不同的任务。我有一个运行良好的insert类,但是调用它时会打开一个新窗口。单击按钮后,如何使其在当前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; 
}

请张贴一些代码……我可以用电子邮件来代替你的图片吗?你可以在你的问题中添加图片和代码。//当我点击Studio插入按钮私人对象SuffEnter(){//试图在Stand窗格的中间运行进程名为MidStack ProcessGrades P1= NeXPoePrimeStices();Stage primaryStage=new Stage();p1.start(primaryStage);//MidStack.getChildren().add(p1);…..没有工作,因为p1不是中间节点。setText(“您单击了插入!”);return null;}“如何发布图片?我对此不熟悉,谢谢”始终使用代码编辑您的问题,而不是将它们作为注释添加。你们可以将你们的图片上传到imgur或任何其他图片托管网站,并附上问题的链接。