Stretching components (buttons, for example) in the GridLayout.

I want to stretch a few buttons in the layer
GridLayout
-


...
GridLayout gridLayout = new GridLayout(2,1);
gridLayout.addComponent(....);
gridLayout.addComponent(.....);
gridLayout.setColumnExpandRatio(1, 1);
gridLayout.setColumnExpandRatio(2, 1);
...

However, there is no result.

How do I stretch the buttons? I would be most grateful for the information!

Thank you!

it turned –


...
        GridLayout gridLayout = new GridLayout(2,1);
...
        newRecord.setSizeFull();
        searchRecord.setSizeFull();
        
        gridLayout.setSizeFull();
        gridLayout.addComponent(newRecord, 0, 0);
        gridLayout.addComponent(searchRecord, 1, 0);

...