I have a live javafx
user application which has a label : No of answers/No of questions
,
No of answers increases as the user answers the question, and number of questions increases as one class throws questions to user.
Label initially looks like - 0/0
I want to bind two different variables (NumberOfAnswers, NumberOfQuestions)
to this label, say if I have 10 questions thrown to user and user has answered 2 it should look like : 2/10
Label ansQuestLbl = new Label("0/0");
if (answerConnector!= null) {
log.info("Going to bind , No of answers: "+answerConnector.getNoOfAnswers());
ansQuesLbl.textProperty().bind(answerConnector.getNoOfAnswers().asString());
log.info("Bound number of answers with label on UI");
}
This only binds Number of answers to the label.
Thanks in advance.