Hey all,

i recently watched an instruction video for starting with JavaFX: http://www.youtube.com/watch?v=EEcpMTpaWhs . This worked fine for me and I was able to create a simple application and run it. Now I wanted to change this a bit and tinker about it. My plan was to set the button's width to the size of the window. So normaly the window has a width of 500 and if i use this:

btn_click.setPrefWidth(500);

I'm able to set the size to the same as the windows. But if I change the size of the window now, it wont effect the button. How can I get the button to its maximum width undependent of window's size?

Thanks in advance.