Calling PaintComponent in Jython
Luiz Felipe Martins
fmartins at mindspring.com
Thu Aug 22 06:26:02 EDT 2002
I´m trying to do something like this:
class MyPanel(javax.swing.JPanel):
def PaintComponent(self,g):
javax.swing.JPanel.PaintComponent(self,g)
...
This does not work because PaintComponent is protected. In the book Jython
for Java Programmers (excellent, btw), R. Bill suggests either changing the
Jython registry or to write a Java class to mediate access.
I wonder if there are any other workarounds, or if the Jython folks are
planning changes in the way access to protected methods is handled?
Note: I know I can make my code work overriding paint instead of
PaintComponent, I just am curious to know how it can be done.
--
L. Felipe Martins
Department of Mathematics
Cleveland State University
fmartins at mindspring.com
More information about the Python-list
mailing list