Centering a component
Opened this issue · 1 comments
allenvpn312 commented
Is there a way to center a component?
I tried using setJustifyContent(JusttifyContentMode.CENTER) and setAlignItems(Alignment.CENTER) and it doesn't do anything.
For example:
Card card = new Card(new TitleLabel("Title"), new H1("Centered Text"));
Thanks
mrgreywater commented
try
card.getContent().setAlignItems(Alignment.CENTER);
card.getContent().setJustifyContentMode(JustifyContentMode.CENTER);