Search in sources :

Example 1 with DateChooser

use of com.kyj.fx.voeditor.visual.component.date.DateChooser in project Gargoyle by callakrsos.

the class DateChooserExam method start.

@Override
public void start(final Stage primaryStage) {
    primaryStage.setTitle("Hello Calendar!");
    StackPane root = new StackPane();
    final DateChooser dateChooser = new DateChooser();
    root.getChildren().add(dateChooser);
    Scene scene = new Scene(root, 300, 250);
    primaryStage.setScene(scene);
    primaryStage.setOnHiding(new EventHandler<WindowEvent>() {

        public void handle(WindowEvent event) {
            System.out.println("date " + dateChooser.getDate());
        }
    });
    primaryStage.show();
}
Also used : WindowEvent(javafx.stage.WindowEvent) DateChooser(com.kyj.fx.voeditor.visual.component.date.DateChooser) Scene(javafx.scene.Scene) StackPane(javafx.scene.layout.StackPane)

Aggregations

DateChooser (com.kyj.fx.voeditor.visual.component.date.DateChooser)1 Scene (javafx.scene.Scene)1 StackPane (javafx.scene.layout.StackPane)1 WindowEvent (javafx.stage.WindowEvent)1