JavaFX Button with multiple text lines
问题 I need to create a toolbar in my screen that will have multiple buttons, and each button must have multiple lines of Text. For example: I looked over the internet and StackOverflow but I couldn't find anything showing how to do this in JavaFX. I'm using JavaFX 8. Someone could help me, please? Tks 回答1: Also you can use the wrapTextProperty . But you have to set toolbar height greater than expected button height. Button btn = new Button(); btn.wrapTextProperty().setValue(true); // or btn