Example usage for javafx.scene.shape Rectangle isResizable

List of usage examples for javafx.scene.shape Rectangle isResizable

Introduction

In this page you can find the example usage for javafx.scene.shape Rectangle isResizable.

Prototype

public boolean isResizable() 

Source Link

Document

Indicates whether this node is a type which can be resized by its parent.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Button btn = new Button("A big button");

    Rectangle rect = new Rectangle(100, 50);
    rect.setFill(Color.WHITE);//from  w  w w .  j  av  a  2  s . com
    rect.setStrokeWidth(1);
    rect.setStroke(Color.BLACK);

    HBox root = new HBox();
    root.setSpacing(20);
    root.getChildren().addAll(btn, rect);

    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.setTitle("Resizable Nodes");
    stage.show();

    System.out.println("btn.isResizable(): " + btn.isResizable());
    System.out.println("rect.isResizable(): " + rect.isResizable());
}