# Power Table Header cell spacing/padding

**URL:** <https://forum.inductiveautomation.com/t/power-table-header-cell-spacing-padding/12500>\
**Category:** General Discussion\
**Created:** [December 27, 2016, 7:25pm UTC](https://forum.inductiveautomation.com/t/power-table-header-cell-spacing-padding/12500 "2016-12-27T19:25:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry101](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jerry101](https://forum.inductiveautomation.com/u/jerry101)\
**Post date:** [December 27, 2016, 7:25pm UTC](https://forum.inductiveautomation.com/t/power-table-header-cell-spacing-padding/12500/1 "2016-12-27T19:25:10Z")

</div>

I am setting the header alignment in the “configureHeaderStyle” function but i can’t seem to find how i can set a padding or cell spacing for the header. When aligning it puts the text right on the edge. I know for the records of the table you can use the “Inter Cell Spacing” but this does not affect the headers.

Thanks!

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [February 17, 2017, 7:03pm UTC](https://forum.inductiveautomation.com/t/power-table-header-cell-spacing-padding/12500/2 "2017-02-17T19:03:25Z")

</div>

Use BorderFactory to create an empty border. ( See [docs.oracle.com/javase/8/docs/a … ctory.html](https://docs.oracle.com/javase/8/docs/api/javax/swing/BorderFactory.html))  
The example right-aligns header text and adds a 30px padding on the right. Use the code in the configureHeaderStyle extension function

[code]from javax.swing import SwingConstants  
from javax.swing import BorderFactory

return { ‘border’: BorderFactory.createEmptyBorder(0, 0, 0, 30),  
‘horizontalAlignment’: SwingConstants.RIGHT }[/code]
