目前正在编写一个程序,用于在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;
}