Vaadin Grid layout borders

送分小仙女□ 提交于 2019-12-06 03:39:48
Geir Thomas Jakobsen

Yes, you need to add a style to the GridLayout.

final GridLayout gridLayout = new GridLayout();
// Add stuff to it ...
gridLayout.addStyleName("your-css-tag");

In your theme css (in my workspace webapp/VAADIN/themes/mytheme/mytheme.scss):

.your-css-tag {
    border-style: solid;
    border-color: black;
    border-width: 1px;
    padding: 5px;
}

You may need a rebuild of your project, to incorporate the CSS. In Maven, that means executing the Lifecycle tasks clean and install.

For more information, see the manual chapter on Themes.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!