All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.rgielen.fxweaver.samples.springboot.controller.TiledDialogController Maven / Gradle / Ivy

The newest version!
package net.rgielen.fxweaver.samples.springboot.controller;

import javafx.fxml.FXML;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import org.springframework.stereotype.Component;

/**
 * TiledDialogController.
 *
 * @author Rene Gielen
 * @noinspection WeakerAccess
 */
@Component
public class TiledDialogController {

    private Stage stage;
    @FXML
    private VBox dialog;
    @FXML
    public Button closeButton;


    @FXML
    public void initialize() {
        this.stage = new Stage();
        stage.setScene(new Scene(dialog));
    }

    public void show() {
        stage.show();
        closeButton.setOnAction(
                a -> stage.close()
        );
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy