Good morning,
I would like to automatically center the columns on a powertable. I run the following code on the property change event of the powertable currently:
if event.propertyName == 'data':
from com.jidesoft.grid import TableUtils
from javax.swing import JTable
tbl = event.source.parent.getComponent('tbl_offline').getTable()
tbl.setAutoResizeMode(JTable.AUTO_RESIZE_OFF)
TableUtils.autoResizeAllColumns(tbl)
The above code automatically resizes all the columns on the powertable for me. However, the columns themselves won’t be centered. Ideally I’d like to choose which columns I want to center.
##############################################################
The second “bug” I’ve noticed is if I push an update to the client, if the powertable has data on it, all the data will be erased or set to the default startup mode. Is there a way to save the data if an admin pushes out an update to all the clients?
Thank you for any help with the above.