Wait cursor problem

Hello,
Here is the problem :
I've put a wait cursor when there is background treatments and when the user have to wait for it before doing something else.
But, when the EventDispatchThread is doing some treatment (callback), the wait cursor is flickering, giving sometime the impression that background treatments are finished.
Is there a way to keep the cursor in the wait cursor form whatever happening in background ?
Thank u ..
Djeouaille.

setCursor is specific to the Component from which you call it. I would suggest calling setCursor on your top-level frame and nowhere else if you want the appearance that your entire window is busy doing something. Also, be sure to put your calls to setCursor in the main (Swing) thread. Check to see that you're not repeatedly calling setCursor thereby causing the flickering yourself. Ideally you should be able to do the following without having the wait cursor flicker:
topLevel.setCursor(waitCursor)
//perform a lengthy operation
topLevel.setCursor(normalCursor)-B

Similar Messages

  • Automatic Wait Cursor -problems

    I have implemented an automatic wait cursor "system" as decribed in Guide 1( http://www.roseindia.net/javatutorials/WaitCursorEventQueue.shtml)
    The problem I have occurs at a specific moment:
    - I have one Jframe opening another Jframe. This Jframe again (a customer registration form) displays a simple JOptionPane box. At the moment the JOptionPane box is displayed, the whole system goes down.
    At all other times the wait cursor behaves exactly as intended.
    Does anyone have:
    - any experience with this (Guide 1) implementation of automatic wait cursor?
    - any other experience with automatic wait cursors?
    Regards

    yes, i actually use a slightly modified version of that concept and it works very well...so far.
    there is a known deadlock issue with it though which has been reported on many forums.
    you can get easily around it though, without any implications as far as i can tell at least.
    I have tried to reproduce your issue, but in the situation you describe i do not get any
    problems. possibly you ran across the above deadlock problem?
    the one thing i am not so sure about is that you call set/resetCursor not within the EDT.
    however from the source of JComponent.setCursor() it looks as if the call would be done directly
    on the native peer, so in theory it could be safe to do that call from within another thread.
    Edited by: produggt on 20.08.2008 18:47

  • Endless wait cursor

    Lion is horrible. I experience constant wait cursors in mail, browsers and finder. I have been through every level of tech support and am an experienced user. The bottom line is that I regret ever "upgrading" to Lion. Snow Leopard was rock solid, now I am stuck with a bloated dog with useless features and total instability. The very worst of these new features is resume. An absolute albatross.

    A little of both perhpas. I have done everything you suggested, all of which is standrd install protocol, multiple times. The (several) clean installs were on a completely reformatted disk and I have gone through the whole indexing thing. That was an intital issue but is no longer the problem as indicated by the lack of indexing activity before and during the wait cursor period. The wait cursor problem is widespread. I have read about in many forums and have first hand experience with fellow Mac users trying to help solve the problem. There has been very little ascknowledgment of this by Apple. I was just talking to a friend today who bought a brand new Mac and, long after the initial indexing period, continued to experience long wait cursor moments, by which I mean up to 30 or more minutes. I have filed several bug reports related to this and have included system profiles, crash logs, start-up logs and "sudo sysdiagnose" terminal reports. So, yes, I am venting, and yes, I do have a question: when will this problem be fixed? I would also like to acknowledge that I know Lion is working quite well for many if not most people. I have it installed on another computer and have had only a few wait cursor instances. Still, it is widely reported and needs to be addressed. Once it is fixed, there also needs to be ways of turning off features like resume and auto save, restoring the functionality of save as, etc. Some people may find those things useful, but many do not and they should have the option to turn them off without having to resort to compex command line chemistry.

  • Constant wait cursor when editing with LVOOP

    I've searched around several times for any mention of this problem but have never found anything. It continues to drive me crazy so I figure I'd ask about it.
    I have a decently sized project utilizing about 25 LVOOP classes in the hierarchy. Whenever I edit a VI within a class, every change I make causes a wait cursor for about a second or 2. This is not a long time, but when I'm in the middle of making something and trying to edit a VI rapidly, it gets extremely annoying to be blocked every couple seconds as I place, move, and wire objects.
    I assume this has to do with compiling the VI, any callers, and doing something with the class, but is it common to block input while this takes place? Is there any remedy for this?
    I'm developing on a 1 yr old Xeon system with a 10k rpm drive and 12GB of ram, it's definitely not an issue with my computer being slow.
    Thanks

    I am working on a large LVOOP project with 30 lvclasses.  The only time I get the wait cursor is when I edit the type defs and select Apply Changes. I do not notice any delays when editing the VI's whether they are methods or plain old utilities. 
    In my hierarchy, I created inheritance by having lvlibs which also contain lvclasses.  Most methods now access the superclass (well, that's what I call it..  the cluster that contains all classes).
    Do you have access to another PC which has LV installed?  If so, do you get the same behavior?

  • 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.

  • Spinning wait cursor and HDD failing

    I got spinning wait cursor sometimes since a month ago. When the first time I check disk utility SMART status was ok. Yesterday SMART status was failing and it said I have hardware problem can't be repaired. Apple charged me 177 plus tax for replace HDD.
    My question is what is the cause? Failing HDD causes of spinning ball or spinning ball causes of hdd failing( because I had to hold power button to shutdown when its freezing).
    Do I need to ask Genius bar  about spinning ball or replace HDD gonna fix that problem?
    Any idea to avoid of HDD failing?
    Sorry for my bad English. Thank you!!!

    The failing hard drive caused the 'spinning cursor' (beachballing).
    You should have no problems with a new HD.
    Clinton

  • Changing wait cursor in netbeans.

    Hi,
    I'm having problems trying to change my cursor, I'm using netbeans and i want to change the cursor when a task is been doing.
    I have a frameview and will show you the code. But i'm getting a error using setCursor().
    I tried using a Jframe instead of a FrameView and this code works ok. Who knows why i can't use setCursor() with a FrameView?
    Thanks for your help
    public class ProgressBarDemo extends FrameView
    private Task task;
    class Task extends SwingWorker<Void, Void> {
    @Override
    public Void doInBackground() {
    Random random = new Random();
    int progress = 0;
    //Initialize progress property.
    setProgress(0);
    while (progress < 100) {
    //Sleep for up to one second.
    try {
    Thread.sleep(random.nextInt(1000));
    } catch (InterruptedException ignore) {}
    //Make random progress.
    progress += random.nextInt(10);
    setProgress(Math.min(progress, 100));
    return null;
    @Override
    public void done() {
    Toolkit.getDefaultToolkit().beep();
    startButton.setEnabled(true);
    setCursor(null); //turn off the wait cursor
    taskOutput.append("Done!\n");
    /** Creates new form ProgressBarDemo */
    public ProgressBarDemo() {
    initComponents();
    private void startButtonActionPerformed(java.awt.event.ActionEvent evt) {
    startButton.setEnabled(false);
    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    //Instances of javax.swing.SwingWorker are not reusuable, so
    //we create new instances as needed.
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new ProgressBarDemo().setVisible(true);
    }

    So, you are talking about Swing application Framework???
    It would certainly not work because 'FrameView' is neither a Frame, nor a Panel, etc. , I don't think NetBeans would allow you to compile such a code.
    See you can use:
    there is an '.........App' class,( for your case it may be ProgressBarDemoApp, but I doubt it), use its static method to obtain refrence to mainframe like this:
    JFrame frm= ProgressBarDemoApp.getApplication().getMainFrame();
    frm.setCursor(Cursor.WAIT_CURSOR);Another possibility is:
    NetBeans make a default main panel in View named 'mainPanel', you can set its default cursor:
    mainPanel.setCursor(Cursor.WAIT_CURSOR);hope it works............
    Thanks!

  • Spinning wait cursor

    For the past month or so I have been experiencing the wait cursor more and more to the point where it now shows up every 10-15 seconds. This mostly results in my chrome browser to crash and sometimes even completely locking up and forcing me to hold the power button to restart.  I have searched for solutions and nothing has shown to work. My hard drive still has 170 GB available so that isn't the issue.  I have updated norton antivirus that shows no viruses.  I have cleared all my caches and repaired all disk permissions.  I have also updated my OS to lion. I'm not the most computer savvy person but obviously something is conflicting to cause the massive slow down.
    These episodes occur one to two times a day where my MacBook pro is almost unusable.  I brought it in to my college tech service and all they did was open up 10 or so applications and called it okay.
    Anything else that's worth trying? Is there any free diagnostic software that will at least show me what the problem is?

    25 ways to speed up your mac: http://www.maclife.com/awordfromoursponsors?destination=article%2Ffeature%2F25_w ays_speed_your_mac
    troubleshoot the spinning beachball: http://www.macworld.com/article/151583/2010/05/spinningbeachballofdeath.html
    you can also download OmniDiscSweeper to se the largest files on your mac: http://download.cnet.com/OmniDiskSweeper/3000-18512_4-6226.html

  • 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.

  • 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.

  • Wait cursor appears only the first time... unless I don't move the mouse!

    Ah yes, another cursor problem:
    I am setting a wait cursor in my main JFrame when a key-release or a menu item click is detected (the time-consuming action is then triggered in a child JInternalFrame), and so far, it's been working great.
    Then I noticed that the wait cursor only appears the first time the time-consuming action is called (or more precisely, if I never move the mouse, it happens every time as it should, but if I move the mouse, it only happens the first time! Ah, and I noticed I CAN move the mouse but ONLY when it is in the form of the wait cursor!).
    Strangely, I can see the cursor blink briefly when the action is done, precisely when it should be changing back to the default cursor... what gives? If I close the child internal frame and re-open it, I can get the wait cursor again the first time only (again, unless I keep the mouse still, in which case it works great - argh).
    Any ideas would be deeply appreciated!
    Cheers!
    PS - Here's a snippet of how we set the cursor, this is code in our main JFrame, called via either a keypress event or clicking on a menu item - mostly it's stuff that is unrelated, and we simply set the wait cursor as the very first line, so why in the world would it skip that line???? (the rest of the lines do in fact get executed):
    private void refreshMenuItemActionPerformed(java.awt.event.ActionEvent evt) {     doRefreshMenuItemAction(); }
    private void doRefreshMenuItemAction() {
    this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
    JDesktopPane desktop = (JDesktopPane)this.getContentPane().getComponent(0);
    JInternalFrame activeFrame = desktop.getSelectedFrame();
    try {
    if ( activeFrame instanceof IDataDrivenForm ) {
    ((IDataDrivenForm)activeFrame).refresh();
    } catch (Exception ex) {
    ex.printStackTrace();
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

    almost...
    I now see that glasspanes are an answer to that question. I got it to work (almost) using a glasspane (see code snippet below). But what I can't quite grasp now is why this code does not work when I call it from a child (contained) dialog (and possibly internal frames as well)??? When I do so, the dialog freezes (the button I pressed doesn't even release) and the cursor does not change to waiting. This time I'm really not sure where to go next....
    I appreciate anyone who has read this far, and would really be indebted to you for some good advice!
    PS - Here's the nifty code, placed in my main JFrame class. I just substituted "this.setBusy(true);" for every place I was manually setting the WAIT_CURSOR in the past (and of course with matching setBusy(false)):
    public final void setBusy(boolean isBusy)
    Component glassPane = this.getGlassPane();
    Cursor theCursor = isBusy ? Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) : Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR );
    this.setCursor( theCursor );
    glassPane.setCursor( theCursor );
    glassPane.setVisible( isBusy );

  • XY Graph Cursor Problem in Labview 7.1.1?

    Hallo,
    I am  using Labview 7.1.1 and I am facing one problem with XY graph cursor. If I am moving cursor in one graph, I am expecting same movement in another Graph. But when I move cursor in Graph1, cursor in second graph moves but not to exact X value of Graph1.
    Property of Cursor in both graphs must be "Lock to Plot"
    If any body knows about this please let me know ASAP. I am attaching example VI for your reference.
    Thanks,
    Sashi
    Attachments:
    XY Graph Cursor Problem.vi ‏101 KB

    It's a curious effect. Probably the floating point coordinate is sensitive to the exact pixel alignment (I mean that this would not happen if we had for example 1 pixel per point in the X direction).
    Anyway, if you use Cursor Index instead (which is an integer) the behaviour is as expected.
    Paolo
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • Constant "spinning wait cursor" when using firefox 3.6.13 on a MacPro 1,1 2006 with 11GB of memory

    After about 1 hour of use I am getting the "spinning wait cursor" in firefox when I do pretty much anything. Scrolling, link hovers, switching tabs, inspecting DOM tags in firebug, typing in textboxes, you name it. This only recently started happening on my MacPro, and has yet to rear its ugly head on my MacbookPro laptop. Not sure if its my RAM or something....regardless, basically makes firefox useless. In fact, im posting this question in Chrome.
    Usually when firefox gets slow I run SQLite VACCUUM on the profile databases and it helps. This time, no dice. Basically just unusable.
    Machine Specs:
    OS X Version: 10.6.6
    Model Name: Mac Pro
    Model Identifier: MacPro1,1
    Processor Name: Dual-Core Intel Xeon
    Processor Speed: 2.66 GHz
    Number Of Processors: 2
    Total Number Of Cores: 4
    L2 Cache (per processor): 4 MB
    Memory: 11 GB
    Bus Speed: 1.33 GHz
    Memory Speed: 667 MHz DDR2 FB-DIMM

    After about 1 hour of use I am getting the "spinning wait cursor" in firefox when I do pretty much anything. Scrolling, link hovers, switching tabs, inspecting DOM tags in firebug, typing in textboxes, you name it. This only recently started happening on my MacPro, and has yet to rear its ugly head on my MacbookPro laptop. Not sure if its my RAM or something....regardless, basically makes firefox useless. In fact, im posting this question in Chrome.
    Usually when firefox gets slow I run SQLite VACCUUM on the profile databases and it helps. This time, no dice. Basically just unusable.
    Machine Specs:
    OS X Version: 10.6.6
    Model Name: Mac Pro
    Model Identifier: MacPro1,1
    Processor Name: Dual-Core Intel Xeon
    Processor Speed: 2.66 GHz
    Number Of Processors: 2
    Total Number Of Cores: 4
    L2 Cache (per processor): 4 MB
    Memory: 11 GB
    Bus Speed: 1.33 GHz
    Memory Speed: 667 MHz DDR2 FB-DIMM

  • ResultSet wihtin ResultSet but causes cursor problem?

    I have a SQL error when running the code below:
    while(rs0.next()){ ...
    String s= rs0.getString(1);
    ResultSet rs=null;
    rs=getResult1(aConnnection, s);
    /*statment is created in the function and ResultSet returned */
    while(rs.next()){ ...
    rs.close();
    rs0.close();
    Error: java.sql.SQLException: ORA-01000: maximum open cursors exceeded
    The database setting is 200 cursors
    and rs0 has 300 records, rs has only one record each time. I thought there should be only 2 cursors involved, do not know how can get so many.
    Could some one help with my question?
    Thanks in advance,
    YM

    Rethink your design.
    If you let a method create a statement and a resultset, but return only the resultset, then there's no possibility to close the statetement.
    I would create the statement outside the method, pass it to the method to do the query and return the resultset, but control the statement in my calling code.
    So in your example you would hold references to 2 stattement just the same way like to their resultsets and close them all together.
    This is more clean, and maybe will solve your cursor problem.
    If you should come to the result that you would really need more open cursors (if your app runs on many clients at the same time, it could), there must be a DBMS configuration for increasing this limit.

  • Messages will open nothing appears(with wait cursor)

    Since I upgraded to Mavericks, everytime i open Messages, it opens, and the top bar becomes Message settings but nothing appears and the wait cursor keeps turning forever so I have to force quit.
    I have tried opening it from the applications folder and resetting keychain as i read in other threads but it still doesnt work.
    I still get message notifications and the badge appears when i have a message. And the app and accounts are all working on my iphone.
    I keep sending error report to apple every time i force quit but it seems not enough people have this issue...
    Please help, it's bugging me so much.
    Thank you.

    Hi,
    Sending the reports is a silent thing and it may in fact be several Updates before anything makes it way to an update.
    I would check two things first.
    1) Open the Font Book from the Applications folder.
    Top left set it to All Fonts if it is not already
    Then use the Edit Menu > Look for Enabled Duplicates.
    Follow this by checking the Helvetica and Lucida Grande are active (Some App will not launch if Helvetica is Off and Lucida Grande is used to display Buddy lists when they have groups active  - you need the font before you open the app).
    2) Open the Contacts App.
    Use the Card Menu > Go to My Card
    This should be your Card and show your details.
    It should be marked with the Head and Shoulders icon.
    If it is neither of these can you post the Log you are sending to Apple ?
    If it is a Crash Log it may pay too be selective about how much you post.
    We need to see the OS version number info at the top and the app info under that.
    The info about the fault and the thread that crashed and those threads will help.
    The Binary Images bit can be very long.
    Limit this to the first 10 lines or so.
    Messages and the Address Book  should be listed near the top as involved items that have just been used by the app's processes.
    8:52 pm      Saturday; March 29, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

Maybe you are looking for

  • Please give the solutions ASAP.

    Hi Friends, Please give the solutions  if you know 100% correct...please don't go for slice and dice method. 1. Which of the following is true of SID tables? a. SID tables are not part of the basic star schema b. The SID table links the dimension tab

  • Geotag for photos shows up in the wrong arena

    I took some photos in HP Pavilion in San Jose, CA but it says they were taken in Tacoma Dome in Washington. I have an iPhone 5. It seems like all my other photo geotags are right. It doesn't bother me that much but I wanted to report the glitch.

  • Problem in reading data of a file

    Following is the text file(dat.txt), Sent on: 11/24/07 Time: 05:49 PM ES Total number of pages (including this one): 3 FAX: [9,18668650173] Date: 10/3/08 I want to print only "Sent on: 11/24/07" but not "Time" and also i want to print "Time" in a sep

  • How to hide the warning Dialog box in illustrator?

    I need to open the pdf file in 'illustrator cs3' through visual basic coding and then save it as eps. But if i open the pdf file in illustrator some times 'warning dialog box' opened due to the font missing. I need to hide that warning dialog box whi

  • Notification objects entry problem

    Dear all, my client needs to enter multiple functional locations and equipment to the pm notification. is it possible and in which tab? i know similar tab in order but can not find in notification... thanks