aspose 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 Java 8 in Action this week in the Java 8 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
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
Can you pass the Board object to the interface constructor, so that you can save it for when the code needs it?


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help for button
 
Similar Threads
help help
JLabel appears as a JButton
How is a Graphical object move on the Screen by using JButton.
How to refresh the JButton text among other things.
Battleships - guys please help me out!