How can I change the cusror when the mouse button is pressed?

Sandip Chitale

comp.addMouseListener(
  new MouseAdapter() {
    public void mousePressed(MouseEvent me) {
      // If you are using swing you may want to use
      // SwingUtilities.invokeLater(new Runnable {
      //   public void run() {
      comp.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

      // This helps sometimes
      Toolkit.getDefaultToolkit().sync();      
    }});
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact