# Button Border Script

**URL:** <https://forum.inductiveautomation.com/t/button-border-script/11408>\
**Category:** Ignition\
**Created:** [March 23, 2016, 11:39pm UTC](https://forum.inductiveautomation.com/t/button-border-script/11408 "2016-03-23T23:39:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmisztur2](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmisztur2/32/4243_2.png) [@cmisztur2](https://forum.inductiveautomation.com/u/cmisztur2)\
**Post date:** [March 23, 2016, 11:39pm UTC](https://forum.inductiveautomation.com/t/button-border-script/11408/1 "2016-03-23T23:39:45Z")

</div>

Does anyone have an example script on how to change button border in script, possibly the ‘titled panel’ one?

/c

---

<div class="post-metadata">

**Author:** ![Amarth](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarth/32/3313_2.png) [@Amarth](https://forum.inductiveautomation.com/u/Amarth)\
**Post date:** [March 24, 2016, 8:21am UTC](https://forum.inductiveautomation.com/t/button-border-script/11408/2 "2016-03-24T08:21:56Z")

</div>

Here is a script I use to change the border of power tables, as they don’t expose the border property, as far as I know:

```auto
from javax.swing import BorderFactory
myBorder = BorderFactory.createLineBorder(project.constants.COLOR_BLUE_DARK)
event.source.setBorder(myBorder)
```

You have a createTitledBorder() method that could fit your needs.

[BorderFactory](http://docs.oracle.com/javase/7/docs/api/javax/swing/BorderFactory.html)
