logo       

Adding Table to Frame generates: 'javax.swing.JPanel' has no attribute '__: msg#00044

lang.jython.user

Subject: Adding Table to Frame generates: 'javax.swing.JPanel' has no attribute '__call__'

Reading through the book "Python Programming with the Java Class Libraries" I entered the code on page 417 and got the following results.  What might be causing the error?
 
>>> from javax.swing import JFrame, JTable
>>> frame = JFrame('this is a table test')
>>> table = JTable(4,4)
>>> frame.contentPane().add(table)
Traceback (innermost last):
  File "(console)", line 1, in ?
AttributeError:  instance of 'javax.swing.JPanel' has no attribute '__call__'
>>>
 
 
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise