jeudi 30 juillet 2015

JavaFx - get text value from a ListView of CheckBox

I cannot manage to get the text values of the selected CheckBox i have inside the ListView list.

(a)->{
        ObservableList<CheckBox>l=list.getSelectionModel().getSelectedItems();
        String text="";
        for(CheckBox y:l)text+=y.getText()+" ";
        label.setText(text);
    }

All i have is an empty label.




Aucun commentaire:

Enregistrer un commentaire