- Joined
- Nov 6, 2015
- Messages
- 583
- Thread Author
- #1
Hi there,
I am trying to use the EmbeddableUI this is working fine, but I want to use it to display my progress report on, so I tried it like this:
And it is being executed at my first Tasks get's validated, because I didn't knew how to make it loop like every second without LoopingScript.
Execute:
For some odd reason it keeps returning the value of the label as NULL, I already got the ID created in the .fxml, so I have no clue how to solve this problem, I hope you guys can help me.
I am trying to use the EmbeddableUI this is working fine, but I want to use it to display my progress report on, so I tried it like this:
Code:
@FXML
private Label profitLabel;
Code:
public boolean updateGui() {
if (profitLabel != null) {
System.out.println("The label is: " + profitLabel);
int realProfit = Constants.berryPrice*Constants.berryCollected;
profitLabel.setText("Profit made: " + realProfit);
}
return true;
}
And it is being executed at my first Tasks get's validated, because I didn't knew how to make it loop like every second without LoopingScript.
Execute:
Code:
BerryCollecter gui = new BerryCollecter();
gui.updateGui();
For some odd reason it keeps returning the value of the label as NULL, I already got the ID created in the .fxml, so I have no clue how to solve this problem, I hope you guys can help me.