This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Groovy and the fly likes How does inner class access outter class functions? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Languages » Groovy
Reply locked New topic
Author

How does inner class access outter class functions?

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 359
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

Joined: Nov 24, 2005
Posts: 14672
    
  11

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.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How does inner class access outter class functions?
 
Similar Threads
How does inner class access outter class functions?
controlling size of part of split pane and another error
How to copy from 4 JTextFields to 1 JTextArea
GUI doesn't display -- sometimes
how to execute simple swing program