🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #8119

Re: change the mouse appearance

#8119
From: John McGrath TeamB
Date: Thu, 26 Oct 2000 00:00
27 lines
1580 bytes
On Wed, 25 Oct 2000 15:58:26 +0100, James McCauley wrote:

> > have you an ideea, how can I change the mouse appearance
> > (set to busy). I want to set the mouse on busy when user
> > load data from database.

> Use setCursor(java.awt.Cursor) method on your java.awt.Component.
> To get a busy cursor ( for example ) use new Cursor (Cursor.WAIT_CURSOR)

Just one note:  Using setCursor() on a component will only change the 
cursor when it is over that component.  As far as I know, the only way to 
do this for all components would be to traverse the component hierarchy 
and set the cursor for each component.

However, if you are using Swing, you can set the glass pane to visible, 
and set the cursor for the glass pane.  When you do this, you may also 
want to add a "dummy" MouseListener to the glass pane, which will prevent 
components from getting any mouse events.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.1461b08ea6ecda13989c80@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8t69c9$7949@bornews.borland.com> <39F6F512.56172BC9@ebookers.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,197508caddbeb193
X-Google-Attributes: gid111d45,public
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Subject: Re: change the mouse appearance
Date: 2000/10/26
Message-ID: <MPG.1461b08ea6ecda13989c80@forums.borland.com>
X-Deja-AN: 686031395
References: <8t69c9$7949@bornews.borland.com> <39F6F512.56172BC9@ebookers.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing