I recall a while ago some talk around calling protected methods in a
parent
java class from a child ruby class.
The example was in relation to paintComponent and looked something like
this
class Cursor < javax.swing.JLabel
save the superclass method
PaintComp =
javax.swing.JComponent.java_class.declared_method’paintComponent’,
’
java.awt.Graphics’
#…
def paintComponent(graphics)
# calling super method
PaintComp.invoke(self.java_object, graphics.java_object)
end
end
This approach doesnt seem to work for me, i get errors stating illegal
access, cannot access protected modifier.
Is there an approach recommend, or is the current approach to create my
own
java sub class and change the access modifier to public.
cheers
simon