# Why UI container is no border?

**URL:** <https://forum.universal-robots.com/t/why-ui-container-is-no-border/5196>\
**Category:** URCap Development\
**Created:** [September 26, 2019, 3:53am UTC](https://forum.universal-robots.com/t/why-ui-container-is-no-border/5196 "2019-09-26T03:53:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon41344975](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon41344975](https://forum.universal-robots.com/u/anon41344975)\
**Post date:** [September 26, 2019, 3:53am UTC](https://forum.universal-robots.com/t/why-ui-container-is-no-border/5196/1 "2019-09-26T03:53:19Z")

</div>

I placed a JTabbedPane inside the InstallationNodeView, but it showed no border.

If placed JPanel like this,  
JPanel panel\_5 = new JPanel();  
panel\_5.setBorder(new TitledBorder(null, “Group1”, TitledBorder.LEADING, TitledBorder.TOP, null, null));

JPanel is no border too.

---

<div class="post-metadata">

**Author:** ![m.birkholz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.birkholz/32/7084_2.png) [@m.birkholz](https://forum.universal-robots.com/u/m.birkholz)\
**Post date:** [September 26, 2019, 6:12am UTC](https://forum.universal-robots.com/t/why-ui-container-is-no-border/5196/2 "2019-09-26T06:12:34Z")

</div>

This works for me:

```
    JPanel panel = new JPanel();
    TitledBorder border = new TitledBorder("test");
    border.setBorder(BorderFactory.createLineBorder(Color.GRAY));
    panel.setBorder(border);

```

I think the thing is that borders are set to white in respect to the Basic UI Design. Changing a Titled Borders border color does the trick.

---

<div class="post-metadata">

**Author:** ![sam.verity-hilton](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sam.verity-hilton/32/6046_2.png) [@sam.verity-hilton](https://forum.universal-robots.com/u/sam.verity-hilton)\
**Post date:** [September 26, 2019, 10:53am UTC](https://forum.universal-robots.com/t/why-ui-container-is-no-border/5196/3 "2019-09-26T10:53:01Z")

</div>

The `LookAndFeel` for the e-series doesn’t give a `TitledBorder` a `LineBorder` by default, so as you pointed out you have to give it a line border separately. The `LookAndFeel` for the CB3 _does_ give a `TitledBorder` a `LineBorder` by default.

---

<div class="post-metadata">

**Author:** ![anon41344975](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon41344975](https://forum.universal-robots.com/u/anon41344975)\
**Post date:** [September 27, 2019, 1:49am UTC](https://forum.universal-robots.com/t/why-ui-container-is-no-border/5196/4 "2019-09-27T01:49:59Z")

</div>

After add color to the border, It works now, thanks.
