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:
From sobolev's response, you can do:
Button btn = new Button(); btn.setText("Line1\n Line2\n Line3"); button.textAlignmentProperty().set(TextAlignment.CENTER);
This will create 3 lines of text and allign them in the center of your button.