# Customizing Alarm status table

**URL:** <https://forum.inductiveautomation.com/t/customizing-alarm-status-table/61102>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [June 23, 2022, 9:22am UTC](https://forum.inductiveautomation.com/t/customizing-alarm-status-table/61102 "2022-06-23T09:22:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 15, 2022, 7:26am UTC](https://forum.inductiveautomation.com/t/customizing-alarm-status-table/61102/4 "2022-12-15T07:26:11Z")

</div>

> [@Halvor\_Johnsen](#):
>
> Alarm Status Table, f.eks. changig name of colums

I recently developed a way to accomplish this. Here is the code:

```auto
def columnLabeler(alarmStatusTable):
	if alarmStatusTable.componentCount > 0:
		for table in alarmStatusTable.getComponents():
			if 'AlarmStatusTable$1' in str(table. __class__ ):
				tableHeaders= table.getTableHeader()
				columnModel = table.getColumnModel()
				for column in range(table.columnCount):
					tableColumn = columnModel.getColumn(column)
					tableColumn.setHeaderValue("Custom Column Name " + str(column + 1))
				tableHeaders.repaint()
			columnLabeler(table)
alarmStatusTable = event.source.parent.getComponent('Alarm Status Table')
columnLabeler(alarmStatusTable)

```

The code finds the table within the component, and then loops through the columns using normal jtable methods to apply custom headers. This version is written for the actionPerformed event handler of a button in the same container as the Alarm Status Table.

The preceding code produces the following result:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/2/3251e37680150fc6b1351c301efc7cde605eb1f6.png)

One thing that is interesting about the code is that even if the client hides and reshows the column, the table remembers the replacement name. That said, the code will have to be ran from either an onInternalFrameOpened event script or something that works in this way, because if the window is _closed_, the table will not remember the next time the window is _opened_.

---

_[View the full topic](https://forum.inductiveautomation.com/t/customizing-alarm-status-table/61102)._
