Hi,
I managed to display a progress bar in a power table using the following code:
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
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…
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}