0
,所以我已经从一个矩形JavaFX的问题将方形当坐标
rect.setX(10);
下面的代码,我也
rect.setY(20);
但每当我编译应用程序的矩形总是移到应用程序框架的中间。使用
进口:
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;
您用于将矩形放置在场景上的布局是什么? – ItachiUchiha