javafx应用程序的REPAINT打开窗口有没有选项?我需要在循环中重新绘制这个窗口(i = 1000)并检查从重新绘制开始到重新绘制结束的时间。
我不知道在哪里使用哪种方法。非常感谢
public class JavaFxCombobox extends Application {
private static final int numberOFTestingLoops = 100;
private List<Long> resultOfAnalysisRepaint = new ArrayList<Long>();
private List<Double> resultOfAnalysisMemory = new ArrayList<Double>();
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
GridPane gridPane = new GridPane();
int counter = 0;
List<ComboBox<String>> comboboxes = new ArrayList<ComboBox<String>>();
for (int i = 0; i < 30; i++) {
for (int j = 0; j < 30; j++) {
counter++;
ComboBox<String> comboBox = new ComboBox<String>();
comboBox.getItems().addAll(Integer.toString(counter), "test1",
"test2");
comboBox.setValue(Integer.toString(counter));
comboboxes.add(comboBox);
gridPane.add(comboboxes.get(counter - 1), j * 30, i * 35);
}
}
Scene scene = new Scene(gridPane);
primaryStage.setScene(scene);
primaryStage.setWidth(1550);
primaryStage.setHeight(670);
primaryStage.show();
}
}