search

Home  >  Q&A  >  body text

My listener doesn't work

public void mouseClicked(MouseEvent e) {

// TODO Auto-generated method stub

System.out.println("Mouse click");

JOptionPane.showMessageDialog(this,"Mouse click");

}


public void mouseEntered(MouseEvent e) {

// TODO Auto-generated method stub

System.out.println("Mouse enters");

JOptionPane.showMessageDialog(this,"Mouse enters");

}


public void mouseExited(MouseEvent e) {

// TODO Auto-generated method stub

}


public void mousePressed(MouseEvent e) {

// TODO Auto-generated method stub

}


public void mouseReleased(MouseEvent e) {

// TODO Auto-generated method stub

}


phpcn_u12709phpcn_u127092676 days ago1701

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-08-07 11:14:52

    The code is incomplete. I can’t help you check this. You can refer to the teacher’s code

    reply
    0
  • Cancelreply