Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Build a JavaFX Application: moving text down in the 'Sup' app, using txt.SetY(50)

Really quick one. Perhaps this will be answered later on, but for this start method:

   @Override
    public void start(Stage primaryStage) throws Exception{
        //Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
        Group root = new Group();
        Text txt = new Text("Sup?");
        txt.setY(50);
        root.getChildren().add(txt);
        primaryStage.setTitle("Sup");
        primaryStage.setScene(new Scene(root, 300, 275));
        primaryStage.show();
    }

Why do we type 50 rather than -50 to move the text line down the window by 50 pixels? I can't get the image of a traditional X&Y axis on graph paper out of my head, so the logical thing to type would be -50 to me?