JTextArea messageDisplayArea=new JTextArea();
messageDisplayArea.addMouseListener(new MouseListener(){
public void mouseEntered(MouseEvent m){
JOptionPane.showMessageDialog(null,"a");
}
});
messageDisplayArea.addMouseListener(new MouseListener(){
public void mouseExited(MouseEvent m){
}
});
messageDisplayArea.addMouseListener(new MouseListener(){
public void mouseClicked(MouseEvent m){
}
});
messageDisplayArea.addMouseListener(new MouseListener(){
public void mousePressed(MouseEvent m){
}
});
messageDisplayArea.addMouseListener(new MouseListener(){
public void mouseReleased(MouseEvent m){
}
});
This is part of my code, I've imported java.awt.* and java.awt.event.* and javax.swing.* but have NOT implemented the MouseListener interface. I've overridden all the methods from the MouseListener interface but the compiler throws 5 errors, all saying that class is not abstract and does not override abstract method in MouseListener. What am I doing wrong?