# Progress bar text in power table

**URL:** <https://forum.inductiveautomation.com/t/progress-bar-text-in-power-table/30014>\
**Category:** Ignition\
**Created:** [November 15, 2019, 11:11pm UTC](https://forum.inductiveautomation.com/t/progress-bar-text-in-power-table/30014 "2019-11-15T23:11:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamad.tayara](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mohamad.tayara](https://forum.inductiveautomation.com/u/mohamad.tayara)\
**Post date:** [November 15, 2019, 11:11pm UTC](https://forum.inductiveautomation.com/t/progress-bar-text-in-power-table/30014/1 "2019-11-15T23:11:47Z")

</div>

Hi,  
I managed to display a progress bar in a power table using the following code:

```auto
if colName == "Status":
		from javax.swing import JProgressBar
		from java.awt import Color
		
		bar = JProgressBar(0,100, setPaintedString=Ture)
		bar.background = Color.WHITE
		bar.foreground = Color.BLUE
		
               bar.setValue(int(value))
		
		return {'renderer': bar}

```

i wounder if it is possible to change the font type and size, and if it is possible to change the alignment of the text (put it on the right of the progress bar). Thanks in advance

---

<div class="post-metadata">

**Author:** ![LuMi](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@LuMi](https://forum.inductiveautomation.com/u/LuMi)\
**Post date:** [December 4, 2019, 10:23am UTC](https://forum.inductiveautomation.com/t/progress-bar-text-in-power-table/30014/2 "2019-12-04T10:23:41Z")

</div>

Hey,  
I have also tried to show the value as string. Without the “setStringPainted” it works fine.  
But as soon as I add this part, the progress bar disappears…

```auto
	if rowIndex == 2 and colIndex == 2:
		from javax.swing import JProgressBar
		from java.awt import Color

		bar = JProgressBar(0,500)
		bar.background = Color.WHITE
		bar.foreground = Color.BLACK
		

		bar.setValue(80)
		bar.setStringPainted(true)
		return {'renderer': bar}

```

does anybody know how to fix that?  
Thank You (🙂

---

<div class="post-metadata">

**Author:** ![mohamad.tayara](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mohamad.tayara](https://forum.inductiveautomation.com/u/mohamad.tayara)\
**Post date:** [December 4, 2019, 1:37pm UTC](https://forum.inductiveautomation.com/t/progress-bar-text-in-power-table/30014/3 "2019-12-04T13:37:50Z")

</div>

you can try to set the stringPainted in the constructor:

```auto
bar = JProgressBar(0,500,StringPainted=True)

```

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [December 4, 2019, 2:26pm UTC](https://forum.inductiveautomation.com/t/progress-bar-text-in-power-table/30014/4 "2019-12-04T14:26:56Z")

</div>

Change true to True

---

<div class="post-metadata">

**Author:** ![LuMi](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@LuMi](https://forum.inductiveautomation.com/u/LuMi)\
**Post date:** [December 5, 2019, 6:54am UTC](https://forum.inductiveautomation.com/t/progress-bar-text-in-power-table/30014/5 "2019-12-05T06:54:40Z")

</div>

Thank you jpark, now it works!  
Is there a way to change the value from percentage to the value itself?
