Nested Tables and their row Height

After adding in table row, contains another table i cant set table height, and tables looks like at related picture:

After adding i call function, then recalculate layout height:


    public void tableHeightOptimizer() {
        Stack<Component> stack = new Stack<Component>();
        stack.push(getWindow().getContent());
        while (!stack.isEmpty()) {
            Component c = stack.pop();
            if (c instanceof ComponentContainer) {
                for (Iterator<Component> i = ((ComponentContainer) c).getComponentIterator(); i.hasNext();) {
                    stack.add(i.next());
                }
            }
            if (c instanceof Table) {
                Table table = (Table) c;
                table.setPageLength(0);
                table.setHeight("100%");
                table.requestRepaint(); 
                table.refreshRowCache();
                for (Object o : table.getItemIds()) {
                    Panel panel = ((Panel) table.getContainerProperty(o, "Перечисление").getValue());
                    stack.add(panel);
                }
            }
        }
    }

but it works not correctly. if i add an item in top level table, all others tables (in rows) redraw correctly.

Can anyone help me?

First, why are you using tables? Could there be another set of components that would work as well? (for example, a series of horizontal layouts inside a vertical layout?)
Second, can you specifically describe (with a picture if necessary) what problem you’re trying to solve? When you say it looks wrong, it’s hard to know what you’re aiming for that is “right”. Ask yourself why, 5 times.

I don’t have the answer to your question–I’m new to vaadin. However, I’m hoping you can provide a more detailed and helpful question. (Could you provide a picture of what you want the result to look like?)