Cursor not changing

Hi
After I edit a cell of a JTable , a JOptionPane of type
showConfirmDialog pops up, to give the user a choice
to save the changes to the database.
When I click Yes,the changes are commited in the database and a
message is displayed that the changes were commited.
My Problem is
When I click the yes button in the JOptionPane, I am trying to change the cursor type to a WAIT_CURSOR, to last till the success msg from the database is displayed.But the cursor is not changing to the WAIT_CURSOR.
My Code is
int selec = JOptionPane.showConfirmDialog(null,
"Do you wish to save changes ?"
"Table name",
JOptionPane.YES_NO_OPTION );
if(selec == 0)
// None of these methods to change cursor are working
myPanel.setCursor(new Cursor(Cursor.WAIT_CURSOR));
OR
setCursor(new Cursor(Cursor.WAIT_CURSOR));
OR
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try
// Call a file that commits the changes to the Database
new set_di_details(param1,param2....);
catch(java.sql.SQLException e){       }
else
// Do not commit the changes
Any help is appreciated

sharath25,
Try setting the cursor on the glass pane of the main frame that your table resides in. For instance...
// Set the cursor on the glasspane of the overall frame (this will also block
// all user interaction until the process is complete.
Component glass = {frame reference}.getGlassPane();
glass.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
glass.setVisible(true);Your database code would go here...
// ...when completed the cursor is returned to normal and the glass pane
// hidden (allowing the user to interact again).
glass.setCursor(null);  // uses default system cursor.
glass.setVisible(false);Of course, this should be done in the same thread that your database code executes in or it will instantly turn itself off.

Similar Messages

  • Gnome cursor not changing

    I'm using Gnome 3 on a fairly new install. I have many of the xcursor packages installed, including xcursor-vanilla-dmz-aa which I'm trying to use. But when I select the cursor theme in gnome-tweak-tool nothing happens, the default cursor stays put. I've restarted the whole computer and confirmed that the changes persist in gnome-tweak-tool, but my cursor never changes. I've tried out other cursor packages and none of them work either.
    I'm not sure where to go from here, the wiki's all suggest that this should work (although I may be misunderstanding them), and there's no errors in any logs (that I can find anyway). halp?

    Your cursor-theme will be in:
    /usr/share/icons/
    Follow these instructions as root or preface each command with sudo (the default folder doesn't exist in a standard GNOME 3 install so you'll be creating it):
    mkdir /usr/share/icons/default
    cd /usr/share/icons/default
    echo "[Icon Theme]" >> index.theme
    echo "Inherits=YOUR_CURSOR_THEME" >> index.theme
    Replace "YOUR_CURSOR_THEME" with the name of the cursor theme you'd like to use.  Restart X.  Edit "index.theme" changing the name of the theme if you'd like to use a different one.  You also need to select the same theme in GNOME Tweak Tool as the one you put in this text file.
    Last edited by headkase (2011-12-29 05:37:48)

  • Cursor not changing to hand on a few sites...

    There are a few websites where I have an intermittent problem problem with certain links that are normally clickable not changing my mouse cursor to the 'hand' when I hover over them. This has happened on Facebook, Grooveshark and a couple of others. Please note this doesn't happen EVERY time, but when it does it's always the same links, and always in the top left hand side of my screen.
    Weirdly, the problem solves itself it I momentarily click away from that page (eg. open a new tab, then go back).
    Any ideas anybody? I'm just wondering if it's my computer or Firefox that's the problem!

    Safe mode is a temporary diagnostic feature of Firefox. You can exit it anytime and start Firefox normally again. Safe mode disables the installed '''Extensions''', themes ('''Appearance''') in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''. Hardware acceleration is also disabled - the manual setting is '''Tools''' > '''Options '''> '''Advanced '''> '''General '''> '''Use hardware acceleration when available'''. All these settings can be also manually toggled/changed to isolate the cause after starting Firefox in normal mode.

  • CSS Problem: Cursor Not Changing

    I want to set the cursor property in css to change the mouse
    cursor when over a certain element. However, it won't change to
    anything other than the hand (ie. cursor: pointer; works, but
    cursor: se-resize; doesn't). It all works perfectly in all browsers
    I've tried including Google Chrome which is also powered by webkit.
    So what's the go with Adobe AIR? Why can't I get the cursor to
    change to anything other than the hand/pointer.
    Thanks

    I just got the adobe creative suite 4 and Im trying to use photoshop but as soon as i boot up the software and create a new document my cursor starts off as the hand. Everytime I scroll over to the tool bar and select something different the cursor simply falls back on the main template as the "hand".  Do I have a posessed hand or something. Any answeres would really help. I've got to get these scenes done for a cartoon soon.

  • Cursor does not change for pop-up window

    I created a link for a pop-up window. The link does work, but the cursor does not change to a pointy finger, the standard link icon.
    I don't know a lot of javascript, but can figure it out if it's just adding some code. Any help would be appreciated! Here's the code:
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    Thanks in advance.
    Todd

    Hi Todd,
    i got the same problem.(cursor not change for pop-up windows) and because i m not an expert in internal html code i did try several solutions to fix it.
    The easiest (but also even longer if u need to do severals) is to create a button (withs 2 overflight changing pics) with "inserer", "image survolée"
    the "image survolée" can be linked to a pop-up window with the correct effect.  To do so highlight the "expected new link to" and on right side task bar ad a "comportement" named "ouvrir la fenetre du navigateur" and optionally choose the size and windows available function of the pop-up. It works even if u need to proceed first with an overflight changing button.
    The result is longer to obtain and not absolutely perfect. So I guess it s only an help solution for a single mateer. i would be glad to get another solution with a text link rather than using the overflight button system. Technically it should be better, more efficient and faster to proceed with applying an html code that really makes the text appearing as a classic link to a new windows whatever pop up or full size window. Please let me know if u get further answer to fix this problem.
    Many thx and excuse my technical english translation about DreamCs4

  • Can not get text selection cursor to change to column selection cursor

    Hi, Thank You for any time and help .
    I'm new to InDesign, and I'm hoping to use the new feature of moving columns / rows.
    But, I can not get the text cursor to change into the column or row selection cursor. 
    I am able to get the resize cursor, or use the ctrl+3 shortcut to select the entire column,
    but I can not get the downward pointing arrow cursor to select the column, and/or move it.
    Sometimes the row selection cursor will appear, and some rows can be moved, but I have been unable to move the columns.
    Thanks again, all my best

    Thank You Sumit !
    That does appear to work, but not in all cases?
    Example: 9/12/2014 10:44:14 AM - YouTube  <--quick vid capture of issue.
    I am able to select and move columns and rows, but columns appear to need a 'clean' column to work / move?
    Thanks again, I sincerely appreciate it!

  • Cursor does not change when hovering over pop-up window link

    I created a text link for a pop-up window. The link does work, but the cursor does not change to a pointy finger, the standard link icon.
    I don't know a lot of javascript, but can figure it out if it's just adding some code.This was done in CS3. Any help would be appreciated! Here's the code:
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    Thanks in advance.
    Todd

    A link would be nice but I suspect that you are not gettign the finger (you knwo what I mean) when you roll over the link because your href is  not set to anything.
    <a href="" onclick=MM_openBrWindow('images/image.jpg','largeDisplay','scrollbars=yes,resizable=yes,width=100,height=120')
    Set your href to "#" or "javascript:;" - the latter is preferred.

  • JSplitPane divider does not change cursor in JDialog

    Hello,
    I am working with a JSplitPane added to a JDialog and when
    I try to move the divider the mouse cursor does not change
    to the resize cursor. If I add the JSplitPane to a JFrame it works
    ok. Is this a bug???
    Try the following code:
    JDialog d = new JDialog();
    d.add(new JSplitPane());
    d.setSize(640,480);
    d.setVisible(true);
    Thanks for any help!

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Testing
      JDialog d = new JDialog();
      public Testing()
        JSplitPane sp = new JSplitPane();
        d.add(sp);
        sp.setUI(new MyUI());
        d.setSize(640,480);
        d.setVisible(true);
      class MyUI extends javax.swing.plaf.metal.MetalSplitPaneUI
        public javax.swing.plaf.basic.BasicSplitPaneDivider createDefaultDivider()
          javax.swing.plaf.basic.BasicSplitPaneDivider divider = super.createDefaultDivider();
          divider.addMouseListener(new MouseAdapter(){
            public void mouseEntered(MouseEvent me){
              d.setCursor(new Cursor(Cursor.E_RESIZE_CURSOR));
            public void mouseExited(MouseEvent me){
              d.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
          return divider;
      public static void main(String[] args){new Testing();}
    }Message was edited by:
    Michael_Dunn
    [EDIT]
    will also need to add Cursor code for mouseDragged()

  • Tool cursor does not change or does not show up

    If you change tools in Photoshop but the cursor does not change (or disappears entirely), this indicates a bug in your video card driver. To fix it, you need to update your video card driver.
    Sometimes you can fix it temporarily by turning down the hardware or driver acceleration in the properties panel for the video card.

    Chris Cox 11/23/02 4:59pm

  • Cursor does not change back to default after resize

    Hi all,
    I have a modal decorated JDialog, in normal situation, i put the cursor on the border, the curosr will change to resize cursor, so i drag it and the dialog is resized, after resized, the cursor should change back to default cursor when i enter the dialog again, but i found that somotimes after several resizes, the cursor fail to change back to default and remain as the resize cursor.

    Hi
    I think there is nothing so strange to cause the problem so I did not put it before, but if someone can help me I will be thankful.
    public class TestFrame extends JPanel
         private static TestFrame testFrame;
         private JFrame frame;
         public static void main(String args[])
              JDialog.setDefaultLookAndFeelDecorated(true);
              testFrame = new TestFrame();
              testFrame.mainImplementation();
         private void mainImplementation()
              JButton jButton = new JButton("Show dialog");
              jButton.addActionListener(new ButtonActionListener());
              add(jButton);
              frame = new JFrame();
              frame.setContentPane(this);
              frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
              WindowListener l = new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        System.exit(0);
              frame.addWindowListener(l);
              frame.setBounds(0, 0, 500, 500);
              frame.setTitle("Test");
              frame.show();
         class ButtonActionListener implements ActionListener
              public void actionPerformed(ActionEvent e)
                   MyDialog jDialog = new MyDialog(frame);
                   jDialog.setVisible(true);
         class MyDialog extends JDialog
              public MyDialog(Frame owner)
                   super(owner);
                   setModal(true);
                   getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
                   JLabel label1 = new JLabel("Label1");
                   JTextField textField1 = new JTextField();
                   textField1.setEnabled(false);
                   textField1.setMinimumSize(new Dimension(100, 25));
                   textField1.setPreferredSize(new Dimension(200, 25));
                   JLabel label2 = new JLabel("Label2");
                   JTextField textField2 = new JTextField();
                   textField2.setEnabled(false);
                   textField2.setMinimumSize(new Dimension(100, 25));
                   textField1.setPreferredSize(new Dimension(200, 25));
                   JLabel label3 = new JLabel("Label3");
                   JTextField textField3 = new JTextField();
                   textField3.setEnabled(false);
                   textField3.setMinimumSize(new Dimension(100, 25));
                   textField1.setPreferredSize(new Dimension(200, 25));
                   JPanel panel = new JPanel(new GridLayout(3, 2));
                   panel.add(label1);
                   panel.add(textField1);
                   panel.add(label2);
                   panel.add(textField2);
                   panel.add(label3);
                   panel.add(textField3);
                   getContentPane().add(panel);
                   pack();
    }

  • Cursor does not change and dock is not responding

    mac mini mid 2011, 10.9.5 logitech wireless keyboard and mouse (wave). Dell 20 something inch monitor with lighting to mini display to hdmi.
    My cursor will get stuck on the arrow and not change on text input fields or the index finger to select links. If it does change at some random point, it will stay to whatever it changes, until it decides to change again. This will change every 10 to 15 minutes depending on how heavy I'm using it. The dock is also not responsive. If it is hidden, it will not pop up, if it is up on magnify, it will not magnify. Once in a great while it will magnify, but only to one spot and will not change.
    In addition, when I hover the mouse, things will not appear or recognize the mouse, like a print or zoom on the bottom of a pdf, or even a field on some web pages. It will not allow me to select some fields. www.jobs.ca.gov is the best example, I can not type a search or select a position. One time I even had the system settings icon stuck to my mouse and could not put it back on the dock. It followed the mouse, when I would single click, it would stay where it was, unless it was at the dock. If I double clicked it would open.
    I've only had this mini for about 4 months, this problem has only been going on for the past couple weeks. There have not been any changes in those past few weeks that I'm aware of. I did upgrade to 2 4gb ram 6 weeks ago and did a software update to 10.9.5 about 2 weeks ago, but I was hoping that would fix this problem. It did not.
    I was also having tons of problems with safari about a week ago, but a reboot into a certain mode, then back to normal reboot solved that.
    Thanks everyone in advance for you time and help.

    I had this same problem and was searching for answers. I also prefer using a circle instead of crosshairs. I hope you've figured it out by now, but, if you haven't, here is the answer (I am using Elements 9, but, it should work for other versions I think):
    1. Open up Elements Editor, Click on Edit, Click on Preferences, Click on Display & Cursors.
    2. Under Painting Cursors, select Full Size Brush Tip
    3. (optional) - if you want crosshairs within your circle, then also select Show Crosshair in Brush Tip.
    4. Click ok.
    Now use the brush, and it should have a circle to use.
    P.S. Sometimes if you have your Caps Lock key on, that removes the circle as well.

  • Cursor does not change with tool selection

    Has anybody experienced this?  My cursor suddenly does not change with the selection of tools when working on photos.  Once I roll over the picture the arrow is lost and becomes a strange 3 small things, so can't do any work accurately.  Still using PS 7 in Win 7.  This was not a problem previously.  Already uninstalled and reinstalled and problem is still there.  I have searched for where this can be fixed.  So far no luck.  Any suggestions?

    First answer, PS 7, not Elements.  Second answer, BIG THANKS, the dpi change corrected the problem. 
    It was an odd issue as PS was working fine for years and then suddenly the problem occured, even though I had not changed the dpi recently.
    A true glitch.  Thanks again for the fix.  Working fine again.

  • Cursor does not change during the editing of clips

    Hi. I am new to iMovie and am looking for some help. I have imported my clips, put them in my timeline and I want to shorten the clips. According to the movie that is on the Apple web site, when moving my cursor over the line separating my clips, my cursor is to 'change' allowing me to shorten the clip. Well, my cursor does not change. Is there a setting that needs to be corrected. Thanks for any help that can be offered.

    Hi konrad - the View Menu DOES have a 'Show Clip Volume Levels" IF you are using iMovie HD!
    But according to your Profile you have iMovie 4. Volume control in that version is at the bottom beneath the Timeline Audio tracks.
    Hope this helps clear up your confusion.
    Better to use the iMovie 4 forum in your case!:-)

  • Cursor does not change to a circle when using eraser

    Cursor does not change to a circle when using the eraser.
    I'm sure it must be a tick box somewhere.
    Its always been ok previously.

    I had this same problem and was searching for answers. I also prefer using a circle instead of crosshairs. I hope you've figured it out by now, but, if you haven't, here is the answer (I am using Elements 9, but, it should work for other versions I think):
    1. Open up Elements Editor, Click on Edit, Click on Preferences, Click on Display & Cursors.
    2. Under Painting Cursors, select Full Size Brush Tip
    3. (optional) - if you want crosshairs within your circle, then also select Show Crosshair in Brush Tip.
    4. Click ok.
    Now use the brush, and it should have a circle to use.
    P.S. Sometimes if you have your Caps Lock key on, that removes the circle as well.

  • Mouse cursor will not change to brush cursor in photoshop cs6

    Hello can I ask for your help please.
    My mouse cursor will not change to a paint brush cursor.  I have tried the preferences/cursor selection but it still does nothing, I have also tried resetting the brush tool and still nothing.
    I am also using a wacom but I don't think its my tablet, I am using a IMac.
    Thank you.

    Is the Caps Lock on?

Maybe you are looking for