File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Other Languages » Groovy
Reply locked New topic
Author

How does inner class access outter class functions?

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 333
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é
Marshal

Joined: Nov 24, 2005
Posts: 14361

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.


[SCBCD Wall of Fame] [My Blog]
All roads lead to JavaRanch
Help Japan. Make a donation.
 
 
subject: How does inner class access outter class functions?
 
Threads others viewed
how to execute simple swing program
controlling size of part of split pane and another error
GUI doesn't display -- sometimes
How to copy from 4 JTextFields to 1 JTextArea
How does inner class access outter class functions?
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture