Introducing Scene Builder - JavaFX Tutorial Part 3

preview_player
Показать описание
-------------------------------------------------------------------------------------------------------------------------------------------
Kept saying ampersand when I meant "at sign" ... In this tutorial we'll start looking at Scene Builder, the free program that you can use to build user interfaces in JavaFX. Finally a good visual designer for Java! Scene builder doesn't quite rival C# in terms of ease of use, but it's getting there.
--------------------------------------------------------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

Haha John, "it looks like its been dead for at least three months" that's hilarious. Great tutorial as always John. Thank you buddy.

apexwindowcleaningservices
Автор

Thank you for all your videos about javaFX.

reksmeyok
Автор

The way you should load FXML files is like this:

FXMLLoader loader = new
Parent root = loader.load();

loader is a FXMLLoader instance. Why is that important? Think about that you want to control state of your Stage (to set it to fullscreen, to close it etc.) from controller that is bound to "Main.fxml" file (outside of App class). You would have to pass instance of your stage to controller. Simple MyController ctrl = new MyController(); and then something like ctrl.initStage(primaryStage); won't work. Way to obtain your controller is by calling MyController ctrl = loader.getController();
Be sure to call loader.load() BEFORE of that.
And that's why you should use approach as I described to load FXML files.

OverG
Автор

Very good explained. Thank you very much.

DscheksnMusik
Автор

just thought id say that its not an ampersand (&) its an at symbol (@) not to be a nob just to make sure no one makes that mistake

DanielJamesCollier
Автор

LMAO I totally thought I missed that part, so I went and opened up the Main.fxml file anyway... great job on the tut anyway tho :)

AdrianBoisclair
Автор

nice cat but does it work with dog images too?

saila
Автор

It has error at: Parent root =

Error: Location is required.
at Source)
Please give me solution! Thanks

wody
Автор

how do I add eventhandlers to stuff inside root
~edit~
Nevermind, I figured out how

Icohedron
Автор

Is this 2.0 Scene Builder? or not? I don't think so. 

mikegps
Автор

The keyboard sounds really hurt my ears.

Pesthuf
join shbcf.ru