To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
How could I display a red star sign with a value in a column cell of a table?Please refer the attachment.
Thanks a lot.
You need to use a column whose type is a Label instead of plain String. Then you can add a Label component in XHTML mode to the column and style the red asterisk using CSS.
table.addContainerProperty("column name", String.class, null);
table.addContainerProperty("column name", Label.class, null);
And for the Label:
new Label("<span class=\"red\">*</span>Project No", Label.CONTENT_XHTML);