Skip to content

Instantly share code, notes, and snippets.

@k33ptoo
Created July 1, 2018 07:43
Show Gist options
  • Save k33ptoo/1759275930c039566e90008f4bba8335 to your computer and use it in GitHub Desktop.
Save k33ptoo/1759275930c039566e90008f4bba8335 to your computer and use it in GitHub Desktop.
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
public class StudentsModel {
private SimpleIntegerProperty studentId;
private SimpleStringProperty firstName;
private SimpleStringProperty lastName;
public StudentsModel(Integer studentId, String firstName, String lastName) {
this.studentId = new SimpleIntegerProperty(studentId);
this.firstName = new SimpleStringProperty(firstName);
this.lastName = new SimpleStringProperty(lastName);
}
public int getStudentId() {
return studentId.get();
}
public void setStudentId(int studentId) {
this.studentId = new SimpleIntegerProperty(studentId);
}
public String getFirstName() {
return firstName.get();
}
public void setFirstName(String firstName) {
this.firstName = new SimpleStringProperty(firstName);
}
public String getLastName() {
return lastName.get();
}
public void setLastName(String lastName) {
this.lastName = new SimpleStringProperty(lastName);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment