Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

javafx get listview fxml id

public class MainDriversController{

    @FXML
    private ListView<String> driversLV;

    private ObservableList<String> observableList = FXCollections.observableArrayList();

    public void initialize(){
        for(int x=0; x<Cparsing.driversNodes.getLength(); x++) {
            observableList.add(Cparsing.driversNodes.item(x).getAttributes().getNamedItem("nick").getNodeValue());
        }
        driversLV.setItems(observableList);
        System.out.println(driversLV);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javafx #listview #fxml #id
ADD COMMENT
Topic
Name
8+9 =