I know this has been asked some times now, however can’t make it work properly.
I can successfully add buttons to the power table, it is just not performing very well. The power table flashes and is unresponsive. Have been following this to get startet, but as said without any luck.
Is anyone doing this with success?
Here’s the code snippet from the configureEditor extension functions (copied directly from the linked thread)
if colName == "String Column":
from javax.swing import AbstractCellEditor, JButton
from javax.swing.table import TableCellEditor
def func(e):
print "This works. My Test."
class MyCellEditor(AbstractCellEditor,TableCellEditor):
def getTableCellEditorComponent(self,table,value,isSelected,row,column):
return JButton("My Button",actionPerformed=func)
return {'editor':MyCellEditor()}
and the configureCell
if colName == "String Column":
from javax.swing import JButton
return { 'renderer' : JButton("My Button") }
Tried moving the code to a script module to remove the imports from every call,
Also, tried creating a JButton object and return this instead of creating a new object every call.
Either attempt didn’t have any effect on performance.