Hello again. I've another JList-related problem.
I have this:
class CustomList(swing.JList):
def __init__(self):
self.model = swing.DefaultListModel()
self.setFont(awt.Font("Courier", awt.Font.PLAIN, 13))
Now, on another part of my script, I have:
class something:
def __init__(self):
self.mylist = CustomList()
But when I attempt to do self.mylist.model.addElement(data), I get a:
AttributeError: 'javainstance' object has no attribute 'addElement'
If I 'print self.mylist.getModel()' I see
"javax.swing.JList$4@...". Any ideas?
astigmatik
|