so i have the following code from rectangle
rect.setX(10);
and
rect.setY(20);
but whenever I compile the application, the rectangle always moves to the middle of the application frame.
Import Used:
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.shape.*;
import javafx.scene.Scene;
import javafx.geometry.Insets;
import javafx.scene.input.MouseEvent;
import javafx.event.EventHandler;
import javafx.scene.input.KeyCombination;
import javafx.scene.paint.Color;
import javafx.scene.layout.*;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
source
share