Table cell content wrapping and horizontal scrollbar

Hello,

I have read some threads on this forum regarding table cell content wrapping. I have successfully managed to get a one-column table to wrap cell content. Adding a second column results in a horizontal scrollbar being displayed, even though I am setting 100 % width and height for all involved components (except the top main Window, which I want to be 90%x90%).

I am using Vaadin 7.1.8.

Below is a simple example when deployed to Tomcat 7.0.47 displays a horizontal scrollbar. Can someone point me in the right direction on how to avoid the horizontal scrollbar from being displayed, i.e. the table shall occupy 100 % of the panel and the cell content should fit the table and being wrapped accordingly?

package com.example.test;

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.data.util.BeanContainer;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Table;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;

@SuppressWarnings("serial")
@Theme("testtheme")
public class MainUI2 extends UI {
    @WebServlet(value = "/*")
    @VaadinServletConfiguration(productionMode = false, ui = MainUI2.class)
    public static class Servlet extends VaadinServlet {
    }

    @Override
    protected void init(VaadinRequest request) {
        Window mainWindow = new Window();
        Panel panel = new Panel();
        VerticalLayout vLayout = new VerticalLayout();
        Table table = getTable();

        table.setSizeFull();
        vLayout.setSizeFull();
        panel.setSizeFull();
        
        mainWindow.setWidth("90%");
        mainWindow.setHeight("90%");
        mainWindow.setClosable(true);
        mainWindow.center();

        vLayout.addComponent(table);
        panel.setContent(vLayout);
        mainWindow.setContent(panel);

        addWindow(mainWindow);
    }

    private Table getTable() {
        BeanContainer<String, Person> beans = new BeanContainer<String, Person>(
                Person.class);

        beans.setBeanIdProperty("name");

        beans.addBean(new Person(
                "Ben",
                "a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a"));
        beans.addBean(new Person(
                "John",
                "a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a"));
        beans.addBean(new Person(
                "Samantha",
                "a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a"));
        Table table = new Table();
        table.setContainerDataSource(beans);
        table.setPageLength(0);
        table.setSelectable(true);

        table.setColumnHeader("name", "Name of person");
        table.setColumnHeader("lifeHistory", "Life history");

        table.setVisibleColumns(new Object { "name", "lifeHistory" });

        return table;
    }

    public class Person {
        private String name;
        private String lifeHistory;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getLifeHistory() {
            return lifeHistory;
        }

        public void setLifeHistory(String lifeHistory) {
            this.lifeHistory = lifeHistory;
        }

        public Person(String name, String lifeHistory) {
            this.name = name;
            this.lifeHistory = lifeHistory;
        }
    }
}

Custom theme below:

/* Import the reindeer theme.*/
/* This only allows us to use the mixins defined in it and does not add any styles by itself. */
@import "../reindeer/reindeer.scss";


/* This contains all of your theme.*/
/* If somebody wants to extend the theme she will include this mixin. */
@mixin testtheme {
  /* Include all the styles from the reindeer theme */
  @include reindeer;
  

  .v-table-cell-wrapper{
      white-space: normal;
  }

  .v-table-focus .v-table-cell-wrapper{
      white-space: normal;
  }  
}

Any help is appreciated!

Best regards
Henrik