Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top