public MyTabbedForm() {
this.refresh = new Button("");
this.refresh.addClickListener(buttonClickEvent -> {
this.grid.setItems(getCompany());
});
this.grid = new Grid<>();
this.grid.setWidthFull();
this.grid.addColumn(Company::getName).setHeader("Name");
this.grid.addColumn(company -> (company. getCompanyCode()))
.setHeader("Company Code");
this.grid.addColumn(company -> (company. getCompanyId()))
.setHeader("Company Id");
this.grid.addColumn(company -> (company. getCompanyStatus()))
.setHeader("Company Status");
this.grid.getColumns().forEach(col -> col.setAutoWidth(true));
add(this.refresh,this.grid);
}
But I am able to increase the width of the columns based on the content