javafx get listview fxml id

Solutions on MaxInterview for javafx get listview fxml id by the best coders in the world

showing results for - "javafx get listview fxml id"
Veronica
30 May 2020
1public class MainDriversController{
2
3    @FXML
4    private ListView<String> driversLV;
5
6    private ObservableList<String> observableList = FXCollections.observableArrayList();
7
8    public void initialize(){
9        for(int x=0; x<Cparsing.driversNodes.getLength(); x++) {
10            observableList.add(Cparsing.driversNodes.item(x).getAttributes().getNamedItem("nick").getNodeValue());
11        }
12        driversLV.setItems(observableList);
13        System.out.println(driversLV);
14    }
15}
16