File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

How does inner class access outter class functions?

 
Siegfried Heintze
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
This program works in java. I was expecting it to work in groovy 1.7.8. The problem is line 9. How do call the add function in ButtonDemo initialization?

I could abandon the anonymous inner class and make it work. How can I keep the anonymous inner classes for the the JButton and call JPanel.add?
Thanks!
Siegfried

 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I was expecting it to work in groovy 1.7.8.

What has groovy got to do with this ? Don't duplicate threads. Continue there. Closing this one.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic