File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes need help for button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "need help for button" Watch "need help for button" New topic
Author

need help for button

Max Horstmann
Greenhorn

Joined: Sep 25, 2007
Posts: 3
Hi I need help to give life for a button. Could you tell me how could I call the reset method in the interface class where I replaced the question marks. I tried everything but couldn't make that button work thanks.

interface.java




Board.java


<b>�Example isn't another way to teach, it is the only way to teach�</b> Albert Einstein
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
What have you tried there and what happened? If all the variables are in scope it should be as simple as shouldn't it?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Max Horstmann
Greenhorn

Joined: Sep 25, 2007
Posts: 3
Thanks for the reply but that didn't work. Didn't I need a field first to call method in different class? Such as;

Board reset;

Board.reset(reset);

Something like this.
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42954
    
  73
Can you pass the Board object to the interface constructor, so that you can save it for when the code needs it?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: need help for button