Java Event from imported class

Status
Not open for further replies.

DigitalLogician

Member level 2
Joined
Dec 20, 2009
Messages
45
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,286
Location
USA
Activity points
1,540
I have a java program comprising two classes: Alpha and Bravo. Class Alpha contains the main method. Class Bravo contains a Button that will display a text when pressed. Class Bravo also contains this method:
public boolean action(Event evt, Object obj)

Problem: When I scrap the Bravo class and move the method "action" to Alpha, everything works fine. But when the method "action" is in Bravo, the text does not display.

ASSUMING I WANT TO USE THE TWO CLASSES ALPHA AND BRAVO; ASSUMING I WAN TO KEEP MAIN() IN ALPHA AND ACTION IN BRAVO: how do I fix this?

Thanks.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…