# Beveled Border Color

**URL:** <https://forum.inductiveautomation.com/t/beveled-border-color/9667>\
**Category:** Ignition\
**Created:** [February 5, 2015, 10:09pm UTC](https://forum.inductiveautomation.com/t/beveled-border-color/9667 "2015-02-05T22:09:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [February 5, 2015, 10:09pm UTC](https://forum.inductiveautomation.com/t/beveled-border-color/9667/1 "2015-02-05T22:09:24Z")

</div>

It would be nice to have the double beveled edge of a component (like a numeric label) be a different color than the background. Since I don’t think this is a feature in Ignition, can someone explain how I can modify the color with javax.swing.border?

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [February 6, 2015, 7:07pm UTC](https://forum.inductiveautomation.com/t/beveled-border-color/9667/2 "2015-02-06T19:07:59Z")

</div>

I am not particularly good at Java/Jython, but I figured it out. Here is how I am making it work:

[code]if event.propertyName == “Alarm\_Level”:  
from java.awt import Color  
from javax.swing import BorderFactory  
from javax.swing.border import \*

```
if event.source.Alarm_Level == 0:
	c1 = Color.cyan
elif event.source.Alarm_Level == 1:
	c1 = Color.yellow
elif event.source.Alarm_Level == 2:
	c1 = Color.red
elif event.source.Alarm_Level == 3:
	c1 = Color.blue
c2 = c1.darker()
border_one = BorderFactory.createBevelBorder(BevelBorder.RAISED, c1, c2)
border_two = BorderFactory.createBevelBorder(BevelBorder.LOWERED, c1, c2)
event.source.border = BorderFactory.createCompoundBorder(border_one, border_two)[/code]
```
