In this project I can\'t get whether the Checkbox data was selected or not in the console output.
My code:
import java.util.Arrays;
import java.util.Iter
Try this on your if:
if (change.wasUpdated()) {
String inj = (data.get(change.getFrom()).injured.getValue())?"injuried":"no longer injuried";
System.out.println(data.get(change.getFrom()).lastName.getValue() + ", " +
data.get(change.getFrom()).firstName.getValue() + " "
+ "changed his status to " + inj);
System.out.println();
}
Note the output as it is will only display if the player is injuried otherwise it will be blank:
Selected row: Gareth Bale (injured)
Selected row: Gareth Bale
To replace it to:
Selected row: Gareth Bale true
Selected row: Gareth Bale false
You will also have to change this function in the player class:
public String toString() {
return firstName.get() + " " + lastName.get() + (injured.get()?" true":" false");
}