在学校的一个项目中,我试图得到的操作是单击按钮拉出组合框字符串数组的选定索引,并将该索引与int数组相关联,以便计算最终价格。似乎不起作用,只要按下按钮,价格就会保持在零。 Thrasher ", "The Dictator", "The Street King"}; axle", "8-inch axle
当通过代码添加JavaFX按钮时,如何从另一个类调用按钮的.setOnAction方法。例如,如果我要处理同一个类中的按钮按下: Button continueButton = new Button("Continue");continueButton.setOnAction(new EventHandler<ActionEvent>() { public void