Wait Cursor not showing while moving the Mouse

I have a JFrame application. In that JFrame i have a Jdialog (login screen). After entering user name and password, i am setting the Wait cursor (hour glass) for the JFrame and JDialog. When the mouse cursor is inside dialog, it is properly showing the wait cursor. I can able to move the mouse within dialog.
But When I move the mouse outside the dialog i.e inside JFrame, the wait cursor goes off. It shows default cursor. Even I have set the wait cursor to JFrame.
What may be the problems? If any body knows, please expaling.
Advance thanks for early reply.

if any knows the solution, please post it.

Similar Messages

  • Some email images do not show while using the icloud web app.  I can see the images on my IOS devices and in gmail but I only see a small gray box in the icloud web mail app.  Load HTML images is checked in preferences.

    Some email images do not show while using the icloud web app.  I can see the images on my IOS devices and in gmail but I only see a small gray box in the icloud web mail app.  Load HTML images is checked in preferences.  Is there a solution to this issue?

    I've seen the opposite issue.  My wife recieved an email with jpg attachments.  She couldn't see or print them on her iPhone 4S but they showed up fine in iCloud or in the mail app.  I had her forward the email to herself and then they showed up.  I assume there is an issue with how Apple is processing the attachments and resending causes them to get reformatted in a way that makes them easier to handle.
    So yeah.  Seems like some bugs.  Hope Apple fixes them soon.

  • Why the cursor changes only after moving the mouse?

    I have used the setCursor() on a JInternalFrame to change the image of the cursor. I change the cursor to Cursor.WAIT_CURSOR and back to Cursor.DEFAULT_CURSOR in a new thread. Then the only way for the cursor to change from WAIT to DEFAULT is to move the mouse, otherwise it will remain in WAIT status. What's going wrong?

    I am using version 1.1.2 in JBuilder1. I have an extended Dialog as an interface to change the Oracle Password. When the OK button is selected to complete the process of accessing the DB to make the change, I change cursor to the wait cursor before the DB is accessed. I have to move the mouse to trigger the cursor change to wait. I would think there would be an efficient way to do this. I would also appreciat some help. I'm not sure if this is a problem in later versions.
    Thanks,
    Mike

  • Wait cursor not showing when clicking on a JMenuItem

    I use the wait cursor when I do lengthy operations. The cursor usually works, but I cannot get it to work when I click on a JMenuItem. I saw this while researching the forums:
    "The TreeWillExpandListener is called by the event dispatch thread, the thread responsible for refreshing your GUI. This means that until your loading method completes, no refresh activity is performed."
    Could this be what is causing my problem?
    Thanks for any and all help!

    No. The problem is if your menu item launches some long process, your GUI thread is not getting updated until your process is over and by then, it's too late. The fix is to use threads to launch this long process so that the GUI has time to update the mouse cursor and the user knows what's going on.

  • HT1436 My Power Mac G5 will not fully boot without safe mode, it only comes to a blue screen where my cursor duplicates in to 2, (one is frozen, one can move by moving the mouse). What is my problem, and how do I fix it?

    My Power Mac G5 will not fully boot without safe mode, it only comes to a blue screen where my cursor duplicates in to 2, (one is frozen, one can move by moving the mouse). What is my problem, and how do I fix it?

    Great clue Lukas...
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or some USB or Firewire device, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons

  • The cursor on my iMac freezes, and I cannot do anything unless I unplug the computer. It is NOT a problem with the mouse or the keyboard ... it is internal. How do I fix this??

    The cursor on my iMac (Panther 10.3.9) freezes to where I cannot do anything unless I unplug the computer. It is NOT a problem with the mouse or the keyboard. How do I solve this problem?

    ClassicII wrote:
    Sorry to say but your imac g5 logic board has bad caps. This was a problem apple had and issued a out of warentee fix but that has now expired.
    The cost to get this repaired is more than what you could find another used imac for.
    I would suggest you get some details before you rush to make a diagnosis. You have absolutely no information to base this on. I see you're hitting up on numerous threads all over the place. Quality, meaning several good posts with reliable advice, is much more worthwhile than quantity.

  • Magic Mouse and MS Word 2011 (under OS 10.7, iMac middle 2011): Marking of word in a document stops after a few seconds while still pressing the left button and keep on moving the mouse (batteries full)

    Software: OS X Lion (10.7.4); Microsoft Word für Mac 2011, Version 14.2.2 (120421)
    Hardware: iMac 2.7 GHz Intel Core i5, 12 GB, magic mouse
    To mark several clauses in a doc-document (in MS Word 2011), I press the left mouse button and move the mouse along the words
    My problem:
    While still pressing the left button and moving the mouse, the marking on the screen stops and I can't change the already existing markings any more (to become less or especially more).
    Who knows:
    - why this happens and how I can abondon this behaviour?
    - is it a settings problem in MS Word 2011 or of OS X Lion?
    By the way:
    - I don't watch this behaviour in MS Excel 2011. There everything works fine.
    - The batteries are fully loaded and I'm about 30 to 40 cm (1") away from the iMac (RSSI: -60 dB)
    Thanks for answers.
    redlef

    I have the same problem now that I've enabled FileVault 2 on Mountain Lion.

  • Firefox 4.01 keeps dimming the screen after a few secnds unless you keep moving the mouse.This is very annoying. It doesn't do it on Explorer or while in Windows so it is only happening ince I upgraded to 4.01

    Firefox 4.01 keeps dimming the screen after a few seconds
    unless you keep moving the mouse. This is very annoying.
    It doesn't do it on Explorer or while in Windows.
    It is only happening since I upgraded to 4.01
    It happens even on this page if I stop typing or moving the mouse.

    Symantec have released an update for Norton 360 to make it compatible with Firefox 4, for details see http://us.norton.com/support/kb/web_view.jsp?wv_type=public_web&docurl=20100720113635EN&ln=en_US

  • Place Cursor not showing the (#) number of text files loaded

    Hi all,
    I´m using Indesign CS3, updated to the latest patch availabe, this is 5.0.4. I´m using Windows 7 32b.
    When trying to import text files via File > Place and I select 2 o more text files and click OK, the Place Cursor should show in parenthesis the number of files loaded right?. Well the bizarre issue I´m dealing with is that this (#) doesn´t show up. I can see the little preview of the text to be imported but not the (#) number of text files loaded. If I press the down arrow key on the keyboard the mini text updates and cicles through all the loaded texts. That's fine.
    I wanted to screen capture this issue so I installed Techsmith Snagit 9 on my computer. When I was ready to capture the Place Cursor on Indesign, Snag it captured it showing (2) documents loaded. ???? What´s going on?
    Anyone could explain this issue?
    I´ve already rebuild my Preferences with no luck.
    What I see in Indesign http://img214.imageshack.us/img214/1774/whatiseeinindesign.jpg
    What I see after the screen capture with Snag it 9 http://img299.imageshack.us/img299/6001/screencaptureinsnagit.jpg
    Thanks for your help.
    Francesc.

    I use jdk1.5 on Xp. Ok, I'll check it again

  • A movie i purchased does not show up in  the download after it suddenly stopped while downloading over half way through

    a movie i purchased does not show up in  the download after it suddenly stopped while downloading over half way through.. help!

    I totally agree, I am not going to discredit your comment as everyone is entitled to their opinion as I am BUT, I will not bad mouth other members, especially since  may have not have written my initial statement in a logical manner so Ill try and answer them in order to your response.
    1. I DO LIKE iTunes in general and on the whole  BUT I dislike the new update, iTunes 11, it has completely buggered everything up.
    2. Prior to the update, everything worked brilliantly, including Apple TV. It was user friendly and was easy to use. The new update is counter-intuative and is hard to find, fix anything and as I have had to find out at my cost, reset my Apple TV and start downloading all over again. So let me reaffirm, it is iTunes11 I find hard to fathom, not the old iTunes.
    3. No I am not a developer but I have been using PC's for over 20 years so I do know how one works.
    4. Good Question about who would help me, again, it is someones opinion against someone elses. One day, I may write something that generally people agree with, another they may not, depends on the subject.
    5. " I do not love Apple" ?yet I have an iPhone 4s, iPad and Apple TV, find that an illogical comment!
    6. I have made a General Search on the forums on the subject and the general consensus is that the new update is one update to far.
    7. Oh, I am not a genius otherwise I would have solved the issue in the first place!
    Just to re-iterate, I am not bad mouthing Apple in general, all I am saying is that iTunes 11 is one update to far and I am not the only one saying it.... some have gone a lot further than I have, again, their opinion and who am I to argue with them as I have an opnion as you do and I will most deffinatly not bad mouth a member because I disagree with them for the above reason, debate it, yes, not belittle them.
    Hope these have cleared up my initial statement?

  • Why does moving the mouse over an IMAQ image display slow the GUI down so much?

    I have a large application with several vi's running simultaneously under labview 8.6.1.  When I mouse over an image display control in one of the vi's, everything slows down a shocking amount in all the other vi's.  The windows task manager does not show a large increase in CPU use.  My pc is has a quad cpu with 4GB of RAM, and the CPU and memory loads do not appear to be terribly taxing to the system.  However, many of my vi's apparently come almost to a standstill if I just move the mouse in a circle around my image control.
    This looks like it is largely a GUI display issue.  If I make a new vi and put a while loop in it that only displays the iteration loop number to an indicator, I can see the iterating occurring, then stopping totally when I mouse inside the image display control.  When I stop moving the mouse inside the control, or when I move it outside the control, the interation loop number jumps up, as if it had been incrementing behind the scenes the whole time.  So only display of the interating was halted.
    This problem occurs even if the vi with the image control is not executing.  If the vi with the image control is open but not running, and I mouse over the image on it, the other guis all come to a screeching halt.
    Does mousing in the image display control really utterly crush all other guis in all other labview windows?  Is this an issue inherent to the image display control?  If so, is there anything I can do about this? 
    Also, this issue is not entirely limited to display.  I started looking at it in greater detail because this issue also exposed what I think is a race condition in my code.  I have a vi that acquires an image from a ccd and puts it into an IMAQ image.ctl.  This image then gets passed up to a vi up the call chain, and is put on a queue and sent over to be de-queued by a vi that has the image display control.  Here's the kicker:  when I mouse over the image display control, the image successfully gets acquired inside the subvi, and if I probe the wire leading to the output IMAQ image display.ctl, I see the image.  If I simultaneously probe the wire coming out of the subvi one level up the call chain, the image gets lost about half the time.  This only happens if I am mousing in the image display control IN A TOTALLY DIFFERENT AND SEPARATE VI.  If I bump up the priority of the ccd image acquisition vi to 'highest priority', the problem only happens about 1% of the time, and I really have to mouse around to make it happen.  Still, it's disturbing that mousing in the GUI in one window results in a failure of a separate subvi to simply pass an image up the call chain.  I understand that IMAQ images are referenced rather than passed by value, but I don't see why there should be a failure to pass the image up the call chain.  I've looked for a race condition, but can't find one.
    Eric

    I have finally been able to replicate the behavior that you are seeing on another computer once the image was large enough.  Here are a few notes about this behavior:
    First. The UI only slows down when the images are large, 16 bit images.  The reason why this is unique to 16 bit images is that they can only be displayed on the front panel as 8 bit images.  The workaround that Weiyuan suggested to change the 16 bit display mapping hints towards the root of the problem...that any time a mouse runs over the indicator, Windows asks the entire image to re-draw (having a separate indicator overlapping the image will create the same behavior).  With a 16 bit image, not only does the image have to re-draw on the screen but the 16 bit pixels need to be mapped to 8 bits.  When setting the 16 bit display mapping to Full Dynamic, this requires mor computation/pixel than 90% dynamic or one of the other mapping schemes.
    This is expected behavior if your program is running and you're trying to display a large 16 bit image.  To fix this behavior there are a couple options:
    Change the 16 bit display mapping to something other than full dynamic.  You can choose which 8 bits to display or if you want to map the bits. 
    Resize the image just for viewing purposes on your front panel (since you aren't going to view every single pixel of you image on the screen). You can use the IMAQ Resample.vi to do this.  This will allow you to take your 1500x1500 pixel image and only display a 500x500 pixel version.
    If you are interested in viewing small details of the large image, consider just displaying a smaller region of interest at a time.
    Let me know if any of these solutions work for you.  Good luck on your application.
    Zach C.
    Field Engineer
    Greater Los Angeles

  • Direct Path Read waits are not showing in Elapsed time

    Hi,
    I'm having a question regarding interpretation of a SQL trace file. I'm on Oracle 11.2.0.1 HP/UX 64 bit.
    Following is only the overall result of the trace (it is quite big).
    My question is about the Direct Path Read waits which are totallizing 268s of wait but are not showing in the fetch elapsed time (49.58s) and are not showing anywhere in the trace except in the overall result.
    I do not understand why it is not part of the Elapsed time...
    For info, the trace is for the specific session that was performing all the required queries to display an online report. The database is accessed by the Java application using Hybernate.
    The trace was obtained by the following SQL:
    exec sys.dbms_monitor.serv_mod_act_trace_enable(service_name=>'SYS$USERS',waits=>true,binds=>true);Then I query the sessions to find the one created by the application.
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       36      0.43       0.51          0          5          0           0
    Execute     62      0.01       0.01          0          0          0           0
    Fetch      579      4.01      49.06       3027     153553          0        5516
    total      677      4.45      49.58       3027     153558          0        5516
    Misses in library cache during parse: 29
    Misses in library cache during execute: 2
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                   32754        0.00          0.03
      SQL*Net message from client                 32753        2.33        232.01
      Disk file operations I/O                      179        0.00          0.02
      db file sequential read                      2979        0.54         45.72
      SQL*Net more data to client                133563        0.04          5.30
      direct path read                            34840        0.94        268.21
      SQL*Net more data from client                1075        0.00          0.02
      db file scattered read                          6        0.03          0.11
      asynch descriptor resize                       52        0.00          0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       25      0.00       0.02          0          0          0           0
    Execute     58      0.05       0.04          0          0          0           0
    Fetch      126      0.00       0.04          4        161          0         123
    total      209      0.05       0.11          4        161          0         123
    Misses in library cache during parse: 3
    Misses in library cache during execute: 3
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      Disk file operations I/O                        1        0.00          0.00
      db file sequential read                         4        0.01          0.03
      asynch descriptor resize                        1        0.00          0.00
       37  user  SQL statements in session.
       57  internal SQL statements in session.
       94  SQL statements in session.
    Trace file: oxd1ta00_ora_16542.trc
    Trace file compatibility: 11.1.0.7
    Sort options: default
           1  session in tracefile.
          37  user  SQL statements in trace file.
          57  internal SQL statements in trace file.
          94  SQL statements in trace file.
          57  unique SQL statements in trace file.
      241517  lines in trace file.
         568  elapsed seconds in trace file.Thanks
    Christophe

    Christophe Lize wrote:
    Closing this thread even if it's not answered...Sorry, I don't have time to test this myself now, but you shouldn't mark this thread as answered if it is not, because other people might find it and think they find an answer if they have a similar question.
    I suggest you try the following to narrow down things:
    1. Open the RAW trace file and check the cursor numbers of the "direct path reads" - check if you can find any references for those cursor numbers manually. The cursor numbers are those numbers behind the WAIT #<xx>, and you can check if you find any other entry unequal to WAIT #<xx> with the same #<xx>, for example EXEC #<xx> or FETCH #<xx>
    A short primer on how to interpret the raw trace file can also be found in MOS document 39817.1
    2. Run the RAW trace file through alternative free trace file analyzers like SQLDeveloper (yes it can process raw trace files), OraSRP or Christian Antognini's TVD$XTAT. If you have My Oracle Support access you can also try Oracle's own extended Trace Analyzer (TRCA / TRCANLZR). See MOS Note 224270.1
    Check if these tools tell you more about your specific wait event and oddities with the trace file in general.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    Co-author of the "OakTable Expert Oracle Practices" book:
    http://www.apress.com/book/view/1430226684
    http://www.amazon.com/Expert-Oracle-Practices-Database-Administration/dp/1430226684

  • Updating window components WHILE dragging the mouse

    How do I update a whole window (JFrame), including it's components, during the following scenario:
    1. mouse pressed - on any of the window's boundaries
    2. mouse moved to a final position.
    Currently the components of the window do not change until i stop moving the mouse.
    I can't yet find an Event for clicking the mouse on the window's borders.

    Check out my Resizeable code. This may be exactly what you are looking for. I've also included code for Draggable, which you might be interested in
    You are welcome to have and to modify this code, but please do not take credit for it as your own work.
    ==========================================
         public static class Draggable extends MouseAdapter implements MouseMotionListener {
            Point mLastPoint;
            Component mDraggable;
            public Draggable(Component w) {
                w.addMouseMotionListener(this);
                w.addMouseListener(this);
                mDraggable = w;
            public void mousePressed(MouseEvent me) {
                   if (mDraggable.getCursor().equals(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR))) {
                        mLastPoint = me.getPoint();
                   else {
                        mLastPoint = null;
              private void setCursorType(Point p) {
                   Point loc = mDraggable.getLocation();
                   Dimension size = mDraggable.getSize();
                   if ((p.y + RESIZE_MARGIN_SIZE < loc.y + size.height) && (p.x + RESIZE_MARGIN_SIZE < p.x + size.width)) {
                        mDraggable.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
            public void mouseReleased(MouseEvent me) {
                mLastPoint = null;
            public void mouseMoved(MouseEvent me) {
                   setCursorType(me.getPoint());
            public void mouseDragged(MouseEvent me) {
                int x, y;
                if (mLastPoint != null) {
                    x = mDraggable.getX() + (me.getX() - (int)mLastPoint.getX());
                    y = mDraggable.getY() + (me.getY() - (int)mLastPoint.getY());
                    mDraggable.setLocation(x, y);
         public static class Resizeable extends MouseAdapter implements MouseMotionListener {
              int fix_pt_x = -1;
              int fix_pt_y = -1;
            Component mResizeable;
              Cursor mOldcursor;
              public Resizeable(Component c) {
                   mResizeable = c;
                   c.addMouseListener(this);
                   c.addMouseMotionListener(this);
              public void mouseEntered(MouseEvent me) {
                   setCursorType(me.getPoint());
              private void setCursorType(Point p) {
                   boolean n = p.y <= RESIZE_MARGIN_SIZE;
                   boolean s = p.y + RESIZE_MARGIN_SIZE >= mResizeable.getHeight();
                   boolean w = p.x <= RESIZE_MARGIN_SIZE;
                   boolean e = p.x + RESIZE_MARGIN_SIZE >= mResizeable.getWidth();
                   if (e) {
                        if (s) {
                             mResizeable.setCursor(Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR));
                             return;
                        mResizeable.setCursor(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR));
                        return;
                   if(s) {
                        mResizeable.setCursor(Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR));
                        return;
              public void mouseExited(MouseEvent me) {
                   if (mOldcursor != null)
                        ((Component)me.getSource()).setCursor(mOldcursor);
                   mOldcursor = null;
            public void mousePressed(MouseEvent me) {
                   Cursor c = mResizeable.getCursor();
                   Point loc = mResizeable.getLocation();
                   if (c.equals(Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR))) {
                        fix_pt_x = loc.x;
                        fix_pt_y = loc.y;
                        return;
                   if (c.equals(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR))) {
                        fix_pt_x = loc.x;
                        fix_pt_y = -1;
                        return;
                   if (c.equals(Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR))) {
                        fix_pt_x = -1;
                        fix_pt_y = loc.y;
                        return;
              public void mouseReleased(MouseEvent me) {
                   fix_pt_x = -1;
                   fix_pt_y = -1;
              public void mouseMoved(MouseEvent me) {
                   setCursorType(me.getPoint());
              public void mouseDragged(MouseEvent me) {
                   Point p = me.getPoint();
                   int width = fix_pt_x == -1 ? mResizeable.getWidth() : p.x;
                   int height = fix_pt_y == -1 ? mResizeable.getHeight() : p.y;
                   mResizeable.setSize(new Dimension(width > 1 ? width : 1, height > 1 ? height : 1));
         }

  • Wait cursors not set till end of AbstractAction.actionPerformed()

    Hi.
    Is there a problem setting the wait cursor in the actionPerformed method of Actions? I?m running Java 1.4.1_02.
    I am finding that if I try and set a wait cursor in AbstractAction.actionPerformed() it never gets displayed until the very end of the method, which is a bit useless because this is usually when I want to set it back to the default cursor. The result is that I never see the wait cursor when I execute the action.
    I don?t have the same problem with setting cursors in JComponent.actionPerformed().
    Does anyone have a solution?
    The following code fragment demonstrates the problem. It is from a class that extends the abstractAction class. It calls a method of my own to set the wait cursor ( on the root container and its child components ), then sleeps for a bit. The wait cursor is only shown after the sleep.
    public void actionPerformed( java.awt.event.ActionEvent oActionEvent )
    ESTrace.printMsg( ESTrace.LEVEL_3, "Start of ESAction_NEW.actionPerformed.");
    ESValues.m_oUtils.setGlobalCursor( new Cursor( Cursor.WAIT_CURSOR ) );
    ESTrace.printMsg( ESTrace.LEVEL_3, "ESAction_NEW.actionPerformed. Start Wait");
    try
    Thread oThread = Thread.currentThread();
    oThread.sleep(15000);
    catch(Exception e)
    System.out.println("Wait exception");
    e.printStackTrace();
    ESTrace.printMsg( ESTrace.LEVEL_3, "End of ESAction_NEW.actionPerformed");

    If you set the Field 'Comb' value to show a specific number of characters, then you can use this in the Custom Format script:
    if (event.target.comb) {
    var l = event.value.length
    var m = event.target.charLimit
    var x = m - l
    var s = ""
    if (event.value != "") {
    for (var i = 1; i < x; i++) { s = s + "." }
    event.value = event.value + s
    Note that this will space the characters out to fit the width of the field, and may not line up with other fields properly. Otherwise, without using a monospaced font, I don't know if there is a way for you to know how many periods are needed to fill out the field.

  • Wait cursor not working with short cut keys

    Hi,
    I have JButton in my application for which i have set the short cut key using
    button.setMnemonic(char)
    method of JButton. Also i have set the wait cursor for the same button using
    button.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)) .
    I am getting the wait cursor if i click on the button,but not when i use the shortcut key.
    Why is it like that? Pls help me out.

    Why don't you use this class :
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.SwingUtilities;
    public class WaitCursorEventQueue extends EventQueue {
    public WaitCursorEventQueue(int delay) {
    this.delay = delay;
    waitTimer = new WaitCursorTimer();
    waitTimer.setDaemon(true);
    waitTimer.start();
    protected void dispatchEvent(AWTEvent event) {
    waitTimer.startTimer(event.getSource());
    try {
    super.dispatchEvent(event);
    finally {
    waitTimer.stopTimer();
    private int delay;
    private WaitCursorTimer waitTimer;
    private class WaitCursorTimer extends Thread {
    synchronized void startTimer(Object source) {
    this.source = source;
    notify();
    synchronized void stopTimer() {
    if (parent == null)
    interrupt();
    else {
    parent.setCursor(null);
    parent = null;
    public synchronized void run() {
    while (true) {
    try {
    //wait for notification from startTimer()
    wait();
    //wait for event processing to reach the threshold, or
    //interruption from stopTimer()
    wait(delay);
    if (source instanceof Component)
    parent = SwingUtilities.getRoot((Component)source);
    else if (source instanceof MenuComponent) {
    MenuContainer mParent =
    ((MenuComponent)source).getParent();
    if (mParent instanceof Component)
    parent = SwingUtilities.getRoot(
    (Component)mParent);
    if (parent != null && parent.isShowing())
    parent.setCursor(
    Cursor.getPredefinedCursor(
    Cursor.WAIT_CURSOR));
    catch (InterruptedException ie) { }
    private Object source;
    private Component parent;
    and then add to your application :
    //Wait cursor
    EventQueue waitQueue = new WaitCursorEventQueue(200);
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(waitQueue);
    The number (200) specifies the milliseconds to activate the WaitCursor.
    It will work anytime your app is busy for more than that time.

Maybe you are looking for

  • Dell SP2309W Display on Core Solo Mini?

    Hi, I'm thinking of buying the new Dell SP2309W display which looks excellent value but I'm not sure if it will work with the mini. The specification states that it is "Full HD 2048 x 1152" which I realise is greater than the 1920 x 1200 stated as th

  • I just re-downloaded i tunes, it won't even start. Please help.

    It just won't start, don't what to do...

  • EM Agent is not starting -

    Hi DBAs, I have installed the Oracle Grid Control Grid Control 10.2.0.5.0 on RHEL 5.4 (64 bit) and repository DB is 11.1.0.7. I installed the agent 10.2.0.5.0 on the Database server sucessfully but it is giving me the following error while starting.

  • How do I import old photos into new iPhoto library?

    I have a new macbook pro running iphoto 11.  I am trying to import my photos onto the new computer from my old computer, running iphoto 8.  I mounted the old computer as a hard disk, but when I go to import the photos into new iphoto library on the n

  • Terminators (Autonomous AI systems) in real life; should they be banned?

    Of course this summer saw the release of the terminator movie. Although I think they are silly in many ways I do think there is some truth to the fact that robots that have an AI that is fully autonomous could spell disaster for mankind. There is not