Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javafx.application.Application;
- import javafx.scene.Scene;
- import javafx.scene.layout.StackPane;
- import javafx.scene.paint.Color;
- import javafx.stage.Stage;
- import jfxtras.labs.scene.control.gauge.Clock;
- import jfxtras.labs.scene.control.gauge.ClockBuilder;
- public class IOS6Clock extends Application
- {
- @Override public void start(Stage stage) throws Exception {
- Clock clock = ClockBuilder.create()
- .secondPointerPaint(Color.rgb(215, 30, 30))
- .brightPointerPaint(Color.rgb(50, 50, 50))
- .brightTickMarkPaint(Color.rgb(50, 50, 50))
- .brightBackgroundPaint(Color.rgb(234, 234, 234))
- .clockStyle(Clock.ClockStyle.IOS6)
- .prefWidth(250)
- .prefHeight(250)
- .running(true)
- .build();
- StackPane pane = new StackPane();
- pane.getChildren().add(clock);
- Scene scene = new Scene(pane, Color.rgb(218, 218, 218));
- stage.setTitle("iOS 6 Clock");
- stage.setScene(scene);
- stage.show();
- }
- public static void main(final String[] args) {
- Application.launch(args);
- }
- }
Add Comment
Please, Sign In to add comment