summaryrefslogtreecommitdiffstats
path: root/src/de/fhswf/in/inf/java2/aufgabe04/CountdownButtonMain.java
blob: be0f3bffa024b06c3bcfba97c53328ad75dadbe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package de.fhswf.in.inf.java2.aufgabe04;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class CountdownButtonMain extends Application
{

   @Override
   public void start(Stage primaryStage)
   {
      CountdownExitButton ceb = new CountdownExitButton("Ok", 30);
      ceb.setOnAction(e -> {
            Platform.exit();
         });
      
      TextFieldWithContextMenu tfwcm = new TextFieldWithContextMenu();
      
      VBox vbox = new VBox(ceb,tfwcm);
      Scene scene = new Scene(vbox);
      primaryStage.setScene(scene);
      primaryStage.show();
      
      ceb.startCountdown();
      ceb.stopCountdown();

   }

   public static void main(String[] args)
   {
      launch(args);
   }
}