Tuesday, 13 August 2013

Implementing an interface in an inner class

Implementing an interface in an inner class

I just want to know how to implement an interface in an inner class. I
have to make an interface called tConvertMethods and then implement that
in the inner class.
You will be doing the event-handling operations using an inner class, have
the inner class implement tConvertMethods interface as well as having it
implement ActionListener inferface.
My code setup is:
public class tConvert extends JFrame{
//constructor
tConvert(){
}
//inner class
private class ButtonHandler implements ActionListener
{
public void actionPerformed(ActionEvent event){
//tConvertMethods{}
}
}
}

No comments:

Post a Comment