I need to create a shadow effect at the bottom of each containers whose parent container is set to boxlayout Y. I tried 9 piece image border for that but it is not working perfectly. I have some issues here. I have added the empty label in the end of each container and set uiid named shadow where i use 9 piece image border from theme. But the problem is that i need single shadow or border. There seems to appear multiple lines of shadow.if i set preferred height in the shadow label, i cannot determine the exact height where single border will appear.(eg. shadow.setPreferredH(20);). I havent used 9 piece border in image before and didnot find anything that solves my problem in the discussion forum. PS i have watched the tutorial in it. How can i solve it?
code:
Container wrapContainerSingleTable = new Container(new BoxLayout(BoxLayout.Y_AXIS));
for (Map<String, Object> element : connectionGroup.responses) {
singleRowContainerr = new Container(new BoxLayout(BoxLayout.Y_AXIS));
Container childContainer = new Container(new BorderLayout());
singleRowContainerr.add(childContainer);
_ _ _ _ _ _ _ _ _
_ _ _ _ __ _ _ _
childContainer.setUIID("ButtonTest");
childContainer.getAllStyles().setMargin(Component.BOTTOM, 0);
childContainer.getAllStyles().setBgColor(0xf4f4f4);
Label shadow = new Label(" ");
singleRowContainerr.add(shadow);
shadow.setUIID("shadow");
shadow.getAllStyles().setPadding(0, 0, 0, 0);
shadow.getAllStyles().setMargin(0, 0, 0, 0);
shadow.getAllStyles().setBgTransparency(0);
//if i set preferred height in the shadow label, i cannot determine the exact height where single border will appear.
//shadow.setPreferredH(20);
wrapContainerSingleTable.add(singleRowContainerr);
}
shadow img
the look i want to achieve (only the bottom horizontal shadow of each row)

9 piece border screenshots
i tried border type as line instead of round as well, but the same outcome




