Jlabel 鼠标划过变成小手状

     jLabel_filter.setIcon(ImageIcons.filter_gif);
     jLabel_filter.addMouseListener(new MouseAdapter() {
         public void mouseClicked(java.awt.event.MouseEvent evt) {
        	 FilterDialog.getInstance(getInstance(), false).setVisible(true);
         }
         public void mouseEntered(MouseEvent e){//鼠标进入
           setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          }
        public  void mouseExited(MouseEvent e){//鼠标移除
           setCursor(Cursor.getDefaultCursor());
         }
     });

 

你可能感兴趣的:(jlabel)