I am displaying books information in the Vaadin grid. It is displayed almost as I wanted it, but still having problem that I don't know how to solve. Therefore I would appreciate advice(s). Here is how I am creating this grid:
private void createBooksTable() {
this.booksTable = new Grid<>();
this.booksTable.setWidth("100%");
this.yearRenderer = new ActionYearRenderer();
this.booksTable.addColumn(this.yearRenderer).setWidth("8%");
this.booksTable.addColumn(new NewTagRenderer()).setWidth("3%");
this.booksTable.addColumn(new AuthorListRenderer()).setWidth("18%");
this.booksTable.addColumn(new TitleRenderer()).setWidth("50%");
this.booksTable.addColumn(new RatingRenderer()).setWidth("4%");
this.booksTable.addColumn(new ReaderRatingRenderer()).setWidth("3%");
this.booksTable.addColumn(new StatusRenderer()).setWidth("5%");
this.booksTable.setItemDetailsRenderer(new BookDetailsRenderer());
}
As you can see, the sum of all width is less than 100%, but last column is going outside of the screen and being cut. Maybe it happening because of some default column padding, as I see quite a gap between columns. I didn't find a way to fit all columns into the screen. If you know the way to do it, please tell me.