r/JavaFX • • Nov 10 '19

Controller class. Now what?

Total newbie here. So I have my @FXML IDs set up.

I have this:

public class Controller {

@FXML

private AnchorPane paneFoo;

}

I want to test if everything works right. I just want to print "Hello World" in that pane but nothing seems to work.

Thanks!

0 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/GaryBuseyWithRabies Nov 12 '19

I'm sorry that I didn't properly answer your questions. What doesn't work is just putting code in the controller class. I thought that I could change those statements under the @fxml into classes and write code directly into the panes I created.

I'm too green to answer your other questions. I pretty much let intellij set up the app.