setSizeFull() does not work for Table in Panel?

Hello everybody.

I have VerticalLayout that contains Panel. This Panel contains Table. Here is the code snippet of constructor of subclass of VerticalLayout:

Table membersTable = new ......;

Panel membersTablePanel = new Panel( "Members" );
membersTablePanel.setSizeFull();
membersTablePanel.addComponent( membersTable );

membersTable.setSizeFull();

this.addComponent( membersTablePanel );

( (VerticalLayout)membersTablePanel.getContent() ).setExpandRatio( this.membersTable , 1 );
this.setExpandRatio( membersTablePanel , 1 );
this.setSizeFull();

What is happening: Table behaves like it has set static height and it has initially approx. 50% height of the Panel (including header).

What I want to achieve is I want Table which is inside the Panel to expand (setSizeFull()) to whole cover Panel.
Is it so, that order of setSizeFull() for every component (Table, Panel, VerticalLayout) has influence on expanding Table to whole Panel?

Thx in advance for helping me.

You also need to set the root layout of the panel to full size.

panel.getContent().setSizeFull();

Thx! It works now as expected.
Good to know that for future.

Thanks. This solved my current issue.