updates
This commit is contained in:
@@ -11,7 +11,7 @@ public class TestMainFx extends Application {
|
||||
public void start(Stage primaryStage) {
|
||||
try {
|
||||
primaryStage.setTitle("Lodge ReservationSystem");
|
||||
Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("main.fxml"));
|
||||
Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("main.fxml"));
|
||||
Scene scene = new Scene(root, 800, 600);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.show();
|
||||
@@ -23,5 +23,4 @@ public class TestMainFx extends Application {
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package lodge;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
|
||||
public class TestMainFxCommandButtonEventController {
|
||||
|
||||
@FXML
|
||||
private Button btnAdd;
|
||||
|
||||
@FXML
|
||||
private void initialize() {
|
||||
|
||||
btnAdd.setOnAction((ev) -> {
|
||||
Platform.exit();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user