How do I change the Color of the Cursor?

Hi!
I have changed the background color of a JTextField. Unfortunately the background color of the textfield is almost identical with the color of the cursor, so the cursor cannot be seen when the mouse pointer points into the textfield.
Is there a way to change the color of the cursor and can this be done using the UIManager?
Thanks,
Alex

I think you need to create a custom cursor from an image like .gif or .jpg.
Look in to the javadoc of java.awt.Toolkit class for creating a custom cusrosor.
toolkit.createCustomCusror(...)
After creating the cursor, set the cursor on the desired components using component.setCursor(myCursor).
Hope this helps
Sai Pullabhotla

Similar Messages

  • How do i change the cursor on a jtable header when clicked for sorting?

    here is my question, how do i change the cursor on a jtable header when I click the header for sorting?
    I think it is suppose to be in the fragment of code where the header listener is implemented for sorting, but I'm not quite sure what is the exact component that holds everything so that i can change the cursor...
    below is what I've tried, but it doesn't seem to work... thank you
    public void addMouseListenerToHeaderInTable(JTable table) {
    final TableSorter sorter = this;
    final JTable tableView = table;
    tableView.setColumnSelectionAllowed(false);
    MouseAdapter listMouseListener = new
    MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    TableColumnModel columnModel =
    tableView.getColumnModel();
    int viewColumn =
    columnModel.getColumnIndexAtX(e.getX());
    int column =
    tableView.convertColumnIndexToModel
    (viewColumn);
    System.out.println("column = "+column);
    if (e.getClickCount() == 1 && column != -1) {
    System.out.println("Sorting ...");
    Cursor oldCursor =
    tableView.getRootPane().getCursor();
    System.out.println("oldCursor.getType()
    = "+oldCursor.getType());
    if (oldCursor.getType() !=
    Cursor.WAIT_CURSOR){
    JComponent parentPane =
    tableView.getRootPane();
    parentPane.getContentPane().setCursor
    (new Cursor(Cursor.WAIT_CURSOR));
    parentPane.setCursor(new Cursor
    (Cursor.WAIT_CURSOR));
    Cursor newCursor =
    parentPane.getCursor();
    System.out.println("newCursor.getType
    () = "+newCursor.getType());
    int shiftPressed = e.getModifiers(
    &InputEvent.SHIFT_MASK;
    boolean ascending = (shiftPressed == 0);
    //System.out.println("tableView.getRootPane()
    is "+tableView.getRootPane().getRootPane());
    sorter.sortByColumn(column, ascending);
    tableView.getRootPane().setCursor(new Cursor
    (Cursor.DEFAULT_CURSOR));
    //System.out.println("Done sorting");
    JTableHeader th = tableView.getTableHeader();
    th.addMouseListener(listMouseListener);
    }

    Hi,
    Try setting the cursor for the table header.
    table.getHeader().setCursor(Wait_Cursor);
    Bala.

  • How do I change the cursor size.

    How do I change the cursor size. I  enlarged  it and now cannot remember where the command is to put it back to normal.

    System Preferences->Accessibility->Display
    Adjust the Cursor Size slider there

  • How do I change the cursor blink rate? Firefox 3.6.10 under Ubuntu.

    How do I change the cursor blink rate? Firefox 3.6.10 under Ubuntu.

    See this old mozillaZine forum thread about this:
    *http://forums.mozillazine.org/viewtopic.php?f=38&t=865895
    ''(please to not post in such old threads)''
    See also:
    * http://kb.mozillazine.org/about:config
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

  • How can i change the Cursor for the hole frame?

    I think this is quite a simple question:
    I would like to change the cursor for the hole Frame, while the programme is reading data from database.
    but with frame.setCousor(...) i get a compiler-error.
    Thank you

    I think this is quite a simple question:
    I would like to change the cursor for the hole Frame,
    while the programme is reading data from database.
    but with frame.setCousor(...) i get a compiler-error.
    Thank youHello,
    there shouldnt be any compiler-error.
    Post some code and we will help.
    docs:
    /**Sets the cursor image to the specified cursor.
    This cursor image is displayed when the contains method for this component returns true for the current cursor location,
    and this Component is visible, displayable, and enabled.
    Setting the cursor of a Container causes that cursor to be displayed
    within all of the container's subcomponents, except for those that have a non-null cursor.*/
    public void setCursor(Cursor cursor)regards
    tim

  • How do I change the cursor to image when you click on it?

    hi everyone,
    Iwould like a user to click on an image of a bottle, and the
    cursor to then turn into the bottle image. I have four bottles in
    total so I would like it to change whenever a user clicks on a
    different bottle image.
    Does anyone know how to do this at all?

    This has got nothing to do with Thunderbird.
    http://www.lmgtfy.com/?q=gmail+default+mail

  • How do I change the Cursor?

    I am having a bit of bother with Elements 8. Yesterday I lost access to the drop shadows filters on my new Windows 7 Pro computer but a re - load has corrected that. However, I now have a wierd cursor which looks a bit like three rather faint stripy hands. This is when I put the cursor over one of the panels eg: to select the filters for instance. It is so faint that It is almost guess work to see where it is!It is an ordinary arrow for some other purposes and if I select the hand tool to move a picture about that is the normal one. On my old XP machine this selection cursor is a hand with a pointing finger and I tried it on a friend's Win 7 pro machine (identiacl to mine) and hers is correct too.
    I'm sure I have done something wrong... but can anyone suggest what?
    Thanks, Dorothy.

    I wish I had a solution for you, Dorothy, because then I could fix the same damn problem on my computer. In my case, the faint "triple cursor" just appeared out of nowhere. I don't know what I did or how to fix it, but it's driving me nuts!
    Thanks to anybody who can help shed some light on this.
    betsyk

  • How can I change the cursor look an my mac

    Can I change my cursor look an a mac

    Do you want to change the look for aesthetic reasons, or to make the cursor easier to see?
    As X423424X indicates, you can use System Preferences to change the size.
    You can also install a utility such as MouseLocator to aid in making your cursor easier to find
    Mouse Locator (free download)
    <http://www.macupdate.com/app/mac/17513/mouse-locator>
    There are other similar utilities that perform a similar service.

  • I am on a Mac and just upgraded to Firefox 8. The cursor has become a permanent open hand and I can't click on links or CoolPreviews anymore. How can I change the cursor back to hand with pointed finger or arrow?

    Upgraded from Firefox 3.6 to 8 on Mac OS X
    Firefox crashed 3 x upon new upgrade and cursor is now a permanent open hand making it difficult to access links and CoolPreviews.
    I want to change this or overwrite the new Firefox with my old one which was slow but at least worked.
    I will do this through Time Machine.,
    Any advice?

    Upgrade your browser to Firefox 8 and check
    * getfirefox.com

  • How can I change the background of a running webpage on my own. Example Facebook I want to change its backround color from white to black just in my view not for all

    How can I change the background of a running webpage on my own. Example Facebook I want to change its background color from white to black just in my view, not for all. Cause I really hate some site with white background because as I read for an hour it aches my eyes but not on those with darker background color.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • In Pages 5.0 How do I change the highlight color?

    In Pages 5.0 How do I change the highlight color?

    Oh!  I understand now.  See screenshot below.  It's called "Character Fill Color":

  • How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)

    Hello,
    Here is the problematic:
    1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
    - I've many button in a doc im creating
    - the color of the buttons is white with black stoke & black text
    - in roll over state i want them to inverse the color coding (the text white & bottom black)
    - currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
    - i would just like to know if there is a function made for this?
    My other questions:
    2° Ive a presentation on which Ive created buttons which tigger pop-up animations
    - i have 5 buttons which trigger animations
    - the viewer can chose to Click on any of the buttons randomly
    - the problem is once the animation is open how can it be close... either:
    a) by it self after "40" seconds
    b) when ther viewer clicks another button
    3° Ive created buttons linking pages..
    - "go to page xxx"
    - when i do a preview and click on the buttons the links dont take me to the right pages
    - is that normal? (maybe in preview its suppose to be like that)
    4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'
    - what should i do?
    5° Once i export it into Swf. how how can i visualize it? or put it online?
    Thank you for your time.

    stlbbl4u wrote:
    Hello,
    Here is the problematic:
    1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
    - I've many button in a doc im creating
    - the color of the buttons is white with black stoke & black text
    - in roll over state i want them to inverse the color coding (the text white & bottom black)
    - currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
    - i would just like to know if there is a function made for this?
    You should setup Object Styles - these can also include Paragarph Styles that can be triggered when the Style is selected.
    http://help.adobe.com/en_US/indesign/cs/using/WS5CEDB81A-0011-4dc9-9DE8-AC7AD4C80076a.html
    My other questions:
    2° Ive a presentation on which Ive created buttons which tigger pop-up animations
    - i have 5 buttons which trigger animations
    - the viewer can chose to Click on any of the buttons randomly
    - the problem is once the animation is open how can it be close... either:
    a) by it self after "40" seconds
    b) when ther viewer clicks another button
    I'm not sure what you mean - I don't do files with Animations
    3° Ive created buttons linking pages..- "go to page xxx"
    - when i do a preview and click on the buttons the links dont take me to the right pages
    - is that normal? (maybe in preview its suppose to be like that)
    Does it work properly when you export it to the finished file?
    4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'- what should i do?
    InDesign won't link directly to youtube videos. I think your best bet would be to use Downloader to download the video and embed them directly in Indesign.
    5° Once i export it into Swf. how how can i visualize it? or put it online? 
    Thank you for your time.
    You can look up how to embed a SWF file into your HTML - but it depends what you mean by "online" there's a dozen ways to get a file "online".

  • How can I change the font and color of an email signature?

    How can i change the font and color of an email signature?

    Mail > Preferences > Signature
    Highlight the Signature.
    Click Format in the menu bar and select " Show Fonts".
    Select the Font.
    Highlight the Text.
    Click Format in the menu bar and select " Show Colors".
    Select the color.
    Mail > Preferences > Composing > Message Format:  Rich Text
    Best.

  • In working on a simple home budget,  how can I change the color of a negative number to red,  during the period the number is negative.    Thanks,

    Using Numbers spreadsheet and In working on a simple home budget,  how can I change the color of a number to RED when it  comes up negative.  (only during the time that it's negative)  Thanks,  ( I hope I did this right!!) 

    The Inspector offers choices of format for negative numbers when you choose Number of Currency as the format for a cell. Also offered when the format is set to Automatic, IF the selected cell(s) contain number(s).
    The choices are in the pop-up menu beside the box for number of decimal places.
    Regards,
    Barry

  • How do I change the color of font in a fillable form in Adobe Reader? How can I check if the writer of the document has given permission to edit color and not just add text?

    How do I change the color of font in a fillable form in Adobe Reader? How can I check if the writer of the document has given permission to edit color and not just add text? Please help! I'm technologically challenged.

    Most forms (99% or more) are created for simple text input, where you cannot change anything.
    The creator of the form could allow Rich Text input (which allows you to change font, text size, color, etc.), but frankly I have never seen such a form, and I wouldn't know how they look.  But I'm sure they would show some kind of controls to alter the text appearance.

  • How can I change the color of birthday calendar?

    The birthday calendar in the new iPhone OS gets it color automatically. How can I change the color? It does not correspond to the color in iCal on my Mac.

    I figured out a solution for changing the other calendars but not the birthday calendar. Although it's not the most direct fix, it worked for me. Apparently Apple didn't think to give us the ability to choose the calendar color. I use Entourage and sync over the air. When I upgraded to iOS 4 my calendar turned bright red and the birthday calendar was blue. I don't use the birthday calendar so it isn't even enabled in my case. What finally worked was to go through the calendar colors one at a time by disabling and re-enabling the calendar in my mail account settings. I would double click the home button to quickly switch between settings and calendar to check the color each time I enabled the calendar. I had to do this 4 or 5 times to cycle through until blue came back up.

Maybe you are looking for

  • Fixed Assets

    Hi experts, I did a acquisition with vendor through fixed assets add-on but I cannot see the particular invoice when I run the Purchase Analysis report(by Purchase Invoice)?So the report is inaccurate. Why the fixed assets add-on is not linked with S

  • Move a procedure from one database to another database

    Hi all, I have a procedure belonging to a schema in one of the databases in a server (say host A). I have a new server (say host B) and I have installed RDBMS and have created a database. Now, I want to move that particular procedure (in host A) to t

  • Streams Configuration

    I have a few questions about streams configuration. I have two oracle DBs veriosn 9.2.0.6. I configured streams with global rules so that I can have bi-directional replication of the databases. 1)Do I still need schema rules for each schema in additi

  • Clear clipboard

    My work involves a lot of bouncing back and forth between finder and PS.  I also do a lot of large cut/paste operations in actions. Most of the time, when I click on a finder window (or anything else) PS kicks up a message that it was unable to expor

  • ActiveX: Safari does not support

    I'm using the "Blackboard Academic Suite" online course delivery system through my university. Many of the functions require support for "ActiveX". Safari doesn't support ActiveX, which is incredibly lame. Are there any ways around this issue (other