在我的情况下,我想将Pane对象从控制器类带到另一个名为Wykres的类,然后向其中添加子类,例如Circle的对象,但是当我尝试通过单击按钮生成圈子时,没有圈子,有人帮我?谢谢。
def classes(c):
print ("You are taking " + c + " classes.")
}
还有Wykres班
def classes(c):
print ("You are taking " + c + " classes.")
}
在这里调用rysujPunkt()方法:
public class Controller {
@FXML
public Label label_x_waga;
@FXML
Label label_y_waga;
@FXML
Pane root_pane;
@FXML
Button button_add;
private static Pane panee;
private SiecNeuronowa siecNeuronowa;
public void initialize(){
siecNeuronowa = new SiecNeuronowa();
panee=root_pane;
}
public static Pane getPane(){
return panee;
}
@FXML
public void button_add_action(){
root_pane = Wykres.getPane_root();
for(int i=0;i<300;i++)
siecNeuronowa.dodajPunkt();
}
}