2012-06-18 58 views
2

我有以下問題:我的鼠標輸入法不起作用,我不知道爲什麼。鼠標按下完美,只有鼠標輸入不了。Trayicon mouseEntered不起作用

這是鼠標listenener:

MouseListener mouseListener = new MouseListener() { 

      public void mouseClicked(MouseEvent e) { 
       jpopup.setLocation(e.getX(), e.getY()); 
       jpopup.setInvoker(jpopup); 
       jpopup.setVisible(true); 
       System.out.println("Tray Icon - Mouse clicked!");     
      } 
      @Override 
      public void mouseEntered(MouseEvent e) { 
       System.out.println("Tray Icon - Mouse entered!");     
      } 

      public void mouseExited(MouseEvent e) { 
       System.out.println("Tray Icon - Mouse exited!");     
      } 

      public void mousePressed(MouseEvent e) { 
       System.out.println("Tray Icon - Mouse pressed!");     
      } 

      public void mouseReleased(MouseEvent e) { 
       System.out.println("Tray Icon - Mouse released!");     
      } 
     }; 

這裏的任務欄圖標:

trayIcon.setImageAutoSize(true); 
trayIcon.addActionListener(actionListener); 
trayIcon.addMouseListener(mouseListener); 

哪裏錯誤?我不知道......

編輯:我使用Eclipse,如果這是有趣......

回答