Guest User

Untitled

a guest
Oct 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. import javafx.application.Application;
  2. import javafx.scene.Scene;
  3. import javafx.scene.layout.StackPane;
  4. import javafx.scene.paint.Color;
  5. import javafx.stage.Stage;
  6. import jfxtras.labs.scene.control.gauge.Clock;
  7. import jfxtras.labs.scene.control.gauge.ClockBuilder;
  8.  
  9. public class IOS6Clock extends Application
  10. {
  11. @Override public void start(Stage stage) throws Exception {
  12.  
  13. Clock clock = ClockBuilder.create()
  14. .secondPointerPaint(Color.rgb(215, 30, 30))
  15. .brightPointerPaint(Color.rgb(50, 50, 50))
  16. .brightTickMarkPaint(Color.rgb(50, 50, 50))
  17. .brightBackgroundPaint(Color.rgb(234, 234, 234))
  18. .clockStyle(Clock.ClockStyle.IOS6)
  19. .prefWidth(250)
  20. .prefHeight(250)
  21. .running(true)
  22. .build();
  23.  
  24. StackPane pane = new StackPane();
  25. pane.getChildren().add(clock);
  26.  
  27. Scene scene = new Scene(pane, Color.rgb(218, 218, 218));
  28.  
  29. stage.setTitle("iOS 6 Clock");
  30. stage.setScene(scene);
  31. stage.show();
  32. }
  33.  
  34. public static void main(final String[] args) {
  35. Application.launch(args);
  36. }
  37. }
Add Comment
Please, Sign In to add comment