1

I am using Javafx. I have gridpane(1,2). My gridpane ends with buttons (1,2) and (0,2). I want to write something under these buttons. I added a text into gridpane. However, since my text's widht is longer than the buttons, the layout does not look nice and buttons are shifted. How can I solve this problem? How can I add label or text without shifting my layout. Here are the settings of my gridpane: `

gridPane.add(text1, 0, 0); 
gridPane.add(textField1, 1, 0); 
gridPane.add(text2, 0, 1);       
gridPane.add(textField2, 1, 1); 
gridPane.add(button1, 0, 2); 
gridPane.add(button2, 1, 2);

gridPane.setVgap(5); 
gridPane.setHgap(5);`
numudoka
  • 25
  • 7

0 Answers0