Hi all,
|
Code:
|
public interface ActionListener{
public actionPerformed(ActionEvent e);
} |
According above code the heading of the JButton method to associate itself with an ActionListener is
|
Code:
|
public void addActionListener(ActionListener aListener); |
So, Why was the parameter aListener chosen to be of an interface
type in this header?
I think that because the parameter aListener its type interface.
What do you think??