neilcsmith-net commented on PR #8276:
URL: https://github.com/apache/netbeans/pull/8276#issuecomment-2681983826

   I don't understand why you're doing anything more than this and making sure 
this class is only ever used off the EDT?
   
   ```java
   private static class DelayedWaitCursor {
   
           private static final int SPAWN_DELAY = 200;
   
           private final JRootPane root;
           private final Timer timer;
   
           private DelayedWaitCursor(JRootPane root) {
               this.root = root;
               timer = new Timer(SPAWN_DELAY, (e) -> {
                   
root.getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                   root.getGlassPane().setVisible(true);
               });
               timer.setRepeats(false);
           }
   
           private void enable() {
               timer.start();
           }
   
           private void disable() {
              timer.stop();
              root.getGlassPane().setVisible(false);
              root.getGlassPane().setCursor(null);
           }
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to