chenwei
asked on
How to write an EventAdapter, EventListener of own?
I am going to write a program as follow:
class A() extends ???
{
...
B b = new B();
b.addMyListener(new MyEventAdapter(){
public void handleMyEvent1(){
doSomework();
}
});
};
...
class B() extends ???
{
...
...
line = readTextFromFile(f);
if(line.equals("OK"))
this.fireMyEvent1(MyEvent. EVENI1);
...
...
}
My question: how can I write the so-called MyEvent, MyEventAdapter and even the MyListener etc.?
class A() extends ???
{
...
B b = new B();
b.addMyListener(new MyEventAdapter(){
public void handleMyEvent1(){
doSomework();
}
});
};
...
class B() extends ???
{
...
...
line = readTextFromFile(f);
if(line.equals("OK"))
this.fireMyEvent1(MyEvent.
...
...
}
My question: how can I write the so-called MyEvent, MyEventAdapter and even the MyListener etc.?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
for creating your event you have 2 make ur interface and its adapter implementation your self, if you r well in making u can do it :)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.