Skip to content

Instantly share code, notes, and snippets.

@sedj601
Created June 23, 2017 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sedj601/0091536c7780796bae1f65020aec0d32 to your computer and use it in GitHub Desktop.
Save sedj601/0091536c7780796bae1f65020aec0d32 to your computer and use it in GitHub Desktop.
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