DigitalLogician
Member level 2
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.
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.