Draw coloured border around Component extension

I have a class which extends Component and would like to draw a border of size 2px in a specific colour around it.
For various classes i see the possibility of using outlineColourId but not for Component.
I guess it’s quite easy but i just don’t see it at the moment.
Thanks for your help!

You can’t draw outside a Component – you would have to make your Component larger and draw inside your border


Also have a look at the GroupComponent, that’s also nice for structuring a layout.