public void mouseClicked(MouseEvent e) {
// TODO Auto-generated method stub
System.out.println("滑鼠點選");
JOptionPane.showMessageDialog(this,"滑鼠點選");
}
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
System.out.println("滑鼠進入");
JOptionPane.showMessageDialog(this,"滑鼠進入");
# }
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
}
代碼不全,這個沒辦法幫你查看的哦,你可以參考下老師的代碼