FlowPane flow = new FlowPane();
flow.setAlignment(Pos.CENTER);
okButton = new Button("Valider");
okButton.setOnAction(new EventHandler() {
@Override
public void handle(Event arg0) {
// TODO Auto-generated method stub
try {
if (sql.getInstance().insertTeam(
CreationTeamStage.this.teamTextField.getText(),
CreationTeamStage.this.teammateTextField.getText(),
CreationTeamStage.this.idS)) {
MessageBox message = new MessageBox("Equipe Cr��",
"F�licitation, l'�quipe "
+ CreationTeamStage.this.teamTextField
.getText() + " a �t� cr�e.");
message.showDialog();
} else {
MessageBox message = new MessageBox("Echec",
"Creation Impossible");
message.showDialog();
}
} catch (SQLException e) {
MessageBox message = new MessageBox("Echec", e.getMessage());
message.showDialog();
}
}
});
okButton.setDefaultButton(true);
flow.getChildren().add(okButton);
FlowPane.setMargin(okButton, insets);
exitButton = new Button("Quitter");
exitButton.setOnAction(new EventHandler() {
@Override
public void handle(Event arg0) {
// TODO Auto-generated method stub
close();