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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Chance Edward](https://uploads.teamtreehouse.com/production/profile-photos/11710016/micro_kuromi.jpg)
Chance Edward
4,507 PointsDoes anyone have the answer to this?
I've switched that original app I was using to load from FXML. Can you do me a favor and add a new Text node in the boombox.fxml file please? Make the text say "Boombox".
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
<VBox fx:controller="com.example.Controller"
xmlns:fx="http://javafx.com/fxml">
<!-- Add your element below -->
<Text boombox="Boombox"
GridPane.rowIndex="0"
GridPane.columnSpan="2"
Gridpane.halignment="CENTER"/>
<Button text="Play"/>
</VBox>
package com.example;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("boombox.fxml"));
primaryStage.setTitle("Boombox");
primaryStage.setScene(new Scene(root, 300, 275));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
package com.example;
public class Controller {
}
1 Answer
![Rohald van Merode](https://secure.gravatar.com/avatar/7d24e2a149d9e70c74d8d4078bdc2fac?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Rohald van Merode
Treehouse StaffHey Chance Edward 👋
For this challenge you don't want to include GridPane settings. Also make sure that you're setting the text
property of the Text field, not the boombox property 🙂
Hope this helps! Happy Coding!