Created
June 23, 2017 23:57
-
-
Save sedj601/0091536c7780796bae1f65020aec0d32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.*; | |
import javafx.animation.*; | |
import javafx.application.*; | |
import javafx.scene.*; | |
import javafx.scene.control.*; | |
import javafx.scene.layout.*; | |
import javafx.stage.*; | |
/** | |
* | |
* @author Sedrick | |
*/ | |
public class JavaFXApplication51 extends Application { | |
@Override | |
public void start(Stage primaryStage) | |
{ | |
Label label = new Label(LocalTime.now().toString()); | |
StackPane root = new StackPane(); | |
root.getChildren().add(label); | |
Scene scene = new Scene(root, 300, 250); | |
primaryStage.setTitle("Hello World!"); | |
primaryStage.setScene(scene); | |
primaryStage.show(); | |
new AnimationTimer() { | |
@Override | |
public void handle(long now) | |
{ | |
label.setText(LocalTime.now().toString()); | |
} | |
}.start(); | |
} | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) | |
{ | |
launch(args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment