Re: How to make cursor disappear?

Discussion in 'Java' started by hh, Jun 27, 2003.

  1. hh

    hh Guest

    Knute Johnson wrote:
    > Knute Johnson wrote:
    >
    >> hh wrote:
    >>
    >>> Knute Johnson wrote:
    >>>
    >>>> I need to make the cursor disappear when it travels over a
    >>>> component. I tried creating a custom cursor with the methods in the
    >>>> Toolkit but it gave me a big black square. Anybody got any good
    >>>> ideas how to do this?
    >>>>
    >>>> Thanks,
    >>>>
    >>> Why the black square?
    >>>
    >>> A custom cursor with a transparent gif usually works
    >>>
    >>> or
    >>>
    >>> int[] pixels = new int[16 * 16];
    >>> Image image = Toolkit.getDefaultToolkit().createImage(
    >>> new MemoryImageSource(16, 16, pixels, 0, 16));
    >>> Cursor transparentCursor =
    >>> Toolkit.getDefaultToolkit().createCustomCursor
    >>> (image, new Point(0, 0), "Transparent");
    >>>

    >>
    >> Thanks very much, I'll give that a try.
    >>

    >
    > hh:
    >
    > that worked great, thanks again.
    >


    I'm glad that worked..
    hh, Jun 27, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Trint Smith
    Replies:
    13
    Views:
    1,477
  2. Colin Graham
    Replies:
    3
    Views:
    655
    Anders NorĂ¥s [MCAD]
    Dec 16, 2004
  3. =?Utf-8?B?VG9tYXMgS2VwaWM=?=

    Changing DEFAULT cursor to WAIT cursor in ASP

    =?Utf-8?B?VG9tYXMgS2VwaWM=?=, Apr 5, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,294
    Bruce Barker
    Apr 5, 2005
  4. invy
    Replies:
    4
    Views:
    380
    CBFalconer
    Dec 28, 2006
  5. dmaziuk
    Replies:
    3
    Views:
    554
    Chris Gonnerman
    Jan 25, 2011
Loading...

Share This Page