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 Design a Better App Separating the Layout

Sample.fxml isn't runnable

 <?import javafx.geometry.Insets?>
<?import javafx.scene.layout.GridPane?>

<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.text.Text?>
<?import javafx.scene.control.TextField?>
<GridPane fx:controller="sample.sup.Controller"
          xmlns:fx="http//javafx.com/fxml" alignment="center" hgap="10" vgap="10">

    <Text text="Sup"
          GridPane.rowIndex="0"
          GridPane.columnSpan="2"
          GridPane.halignment="CENTER"/>

    <Label text="First Name:"
            GridPane.rowIndex="1"
            GridPane.columnSpan="0"/>

     <TextField
          GridPane.columnIndex="1"
          GridPane.rowIndex="1"/>

    <Button text="Say Sup!"
        GridPane.rowIndex="2"
        GridPane.columnIndex="1"
        GridPane.halignment="RIGHT"
    />

</GridPane>