Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javafx make button fill width

i have one button in a borderpane. I want the button to be stretched out horizontally so it fills the entire width.

how can i do that?

like image 288
Johdfn Avatar asked Feb 13 '26 23:02

Johdfn


1 Answers

Just set the maxWidth property of the button to MAX_VALUE.

like image 163
Jai Avatar answered Feb 16 '26 13:02

Jai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!