Skip to content
Snippets Groups Projects
Commit 97eaf72d authored by Sami Zouari's avatar Sami Zouari
Browse files

2eme commit test

parent 71712a83
No related branches found
No related tags found
No related merge requests found
package com.example.testig;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
public class Ecouteur implements EventHandler<ActionEvent> {
@Override
public void handle(ActionEvent actionEvent) {
}
}
......@@ -3,6 +3,8 @@ package com.example.testig;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import java.io.IOException;
......@@ -10,10 +12,14 @@ import java.io.IOException;
public class HelloApplication extends Application {
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 320, 240);
stage.setTitle("Hello!");
stage.setScene(scene);
stage.setTitle("Titre TP!");
BorderPane border = new BorderPane();
Button bouton = new Button("Jouer");
border.setBottom(bouton);
bouton.setOnAction(new Ecouteur());
stage.setScene(new Scene(border, 400, 400));
stage.show();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment