Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javafx.application.Application;
- import javafx.scene.Scene;
- import javafx.scene.control.ScrollPane;
- import javafx.scene.paint.Color;
- import javafx.scene.shape.Rectangle;
- import javafx.stage.Stage;
- public class ScrollPaneSample extends Application {
- @Override
- public void start(Stage stage) {
- Rectangle rectangle = new Rectangle();
- rectangle.setFill(Color.ALICEBLUE);
- rectangle.setWidth(5000);
- rectangle.setHeight(5000);
- final ScrollPane sp = new ScrollPane(rectangle);
- Scene scene = new Scene(sp, 180, 180);
- stage.setScene(scene);
- stage.setTitle("Scroll Pane");
- stage.setWidth(450);
- stage.setHeight(550);
- stage.show();
- }
- public static void main(String[] args) {
- launch(args);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement