I recently set up a table in Eclipse using Vaadin for assistance.
After some trial and error, I successfully removed the borders of the table with the following line of code:
tblResetButton.addStyleName(Reindeer.TABLE_BORDERLESS) ;
However, there is still a lingering vertical line that remains like this:
Is there a method to conceal all cell borders? Additionally, would it be feasible to assign the color #F4F4F4
to the first cell (labeled "Gebruiker") and the color #E2E2E2
to the second cell (the textbox)?
UPDATE:
While the formlayout seemed promising, I struggled to implement background colors so I resorted back to using tables. Here's the code snippet:
JAVA
tblReset.addContainerProperty("Gebruiker", String.class, null);
tblReset.setCellStyleGenerator(new Table.CellStyleGenerator() {
@Override
public String getStyle(Table source, Object itemId, Object propertyId) {
if("Gebruiker".equals(propertyId)){
return "style-name-with-black-background";
} else {
return "style-name-with-yellow-background" ;
}
}
});
CSS
.style-name-with-black-background {
background-color: black ;
}
.style-name-with-yellow-background {
background-color: yellow ;
}