-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeamListController.java
More file actions
33 lines (25 loc) · 917 Bytes
/
Copy pathTeamListController.java
File metadata and controls
33 lines (25 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import javafx.fxml.FXML;
import javafx.scene.layout.VBox;
import javafx.scene.control.Label;
import javafx.scene.text.Font;
public class TeamListController {
@FXML
private VBox TeamListVBox;
private Label[] lineup;
public void initialize() {
TeamListVBox.setSpacing(10);
try {
this.lineup = new Label[ChessMasterController.getDB().getTeamsList().size()];
//Adding Teams to VBox
for(int i = 0; i < ChessMasterController.getDB().getTeamsList().size(); i++) {
lineup[i] = new Label();
lineup[i].setFont(new Font("Georgia", 20));
lineup[i].setText("• " + ChessMasterController.getDB().getTeamsList().get(i).getName());
TeamListVBox.getChildren().add(lineup[i]);
}
}
catch(Exception e) {
e.printStackTrace();
}
}
}