initStyle(StageStyle.DECORATED);
Insets insets = new Insets(12, 10, 12, 10);
BorderPane borderPane = new BorderPane();
GridPane gridPane = new GridPane();
gridPane.setAlignment(Pos.CENTER);
nameLabelRef = new Label("Pseudonyme");
TotalNbGameLabelRef = new Label("Total Parties Jou�es");
TotalNbGameLostRef = new Label("Total Parties Perdues");
TotalNbGameWonRef = new Label("Total Parties Gagn�es");
TotalPointLabelRef = new Label("Total des Points");
averageLabelRef = new Label("Score Moyen");
nameLabel = new Label();
TotalNbGameLabel = new Label();
TotalNbGameLost = new Label();
TotalNbGameWon = new Label();
TotalPointLabel = new Label();
averageLabel = new Label();
try {
nameLabel.setText(u.getName());
TotalNbGameLabel.setText(stat.getNbPartie() + "");
TotalNbGameLost.setText(stat.getNbPartieLose() + "");
TotalNbGameWon.setText(stat.getNbPartieWon() + "");
TotalPointLabel.setText(stat.getNbPoints() + "");
averageLabel.setText(stat.getAverage() + "");
} catch (Exception e) {
MessageBox m = new MessageBox("Echec", e.getMessage());
e.printStackTrace();
m.show();
}
gridPane.add(nameLabelRef, 0, 1);
gridPane.add(nameLabel, 1, 1);
GridPane.setMargin(nameLabel, insets);
gridPane.add(TotalNbGameLabelRef, 0, 2);
gridPane.add(TotalNbGameLabel, 1, 2);
GridPane.setMargin(TotalNbGameLabel, insets);
gridPane.add(TotalNbGameLostRef, 0, 3);
gridPane.add(TotalNbGameLost, 1, 3);
GridPane.setMargin(TotalNbGameLost, insets);
gridPane.add(TotalNbGameWonRef, 0, 4);
gridPane.add(TotalNbGameWon, 1, 4);
GridPane.setMargin(TotalNbGameWon, insets);
gridPane.add(TotalPointLabelRef, 0, 5);
gridPane.add(TotalPointLabel, 1, 5);
GridPane.setMargin(TotalPointLabel, insets);
gridPane.add(averageLabelRef, 0, 6);
gridPane.add(averageLabel, 1, 6);
GridPane.setMargin(averageLabel, insets);
BorderPane.setAlignment(gridPane, Pos.CENTER);
borderPane.setCenter(gridPane);