JLabel 不像按钮,要添加鼠标事件的话 用鼠标事件监听:JLabel jl = new JLabel(); jl.addMouseListener(new MouseListener(){ public void mouseClicked(MouseEvent e) { // 处理鼠标点击 } public void mouseEntered(MouseEvent e) { // 处理鼠标移入 } public void mouseExited(MouseEvent e) { // 处理鼠标离开 } public void mousePressed(MouseEvent e) { // 处理鼠标按下 } public void mouseReleased(MouseEvent e) { // 处理鼠标释放 } });