import javafx.application.Application; 
import javafx.scene.Scene; 
import javafx.scene.control.Label; 
import javafx.scene.layout.StackPane; 
import javafx.stage.Stage; 

public class SceneSizeIssue extends Application { 

    public static void main(String[] args) { 
        launch(args); 
    } 

    @Override 
    public void start(Stage stage) throws Exception { 
        stage.setX(50); 
        stage.setY(50); 
        stage.setWidth(400); 
        stage.setHeight(300); 

        stage.show(); 

        StackPane box = new StackPane(new Label("Rigby")); 
        box.setStyle("-fx-border-color: red"); 
        stage.setScene(new Scene(box)); 

    } 

} 