It's not exactly the same as the example and if you're using Java 7, then it might not work the same regardless. Try setting up your Player
class to use SimpleStringProperty
for the member variables and then add a *Property()
method for each of them that returns the member. For example:
public class Player
{
private SimpleStringProperty name;
public Player(String name)
{
this.name.set(name);
}
public SimpleStringProperty nameProperty() { return name; }
public String getName() { return name.get(); }
public void setName(String name) { this.name.set(name); }
}
Try that and add in the rest of your members the same way.