Article View: borland.public.jbuilder.java.swing
Article #11094jTree and Cursor
From: Bob Lemm
Date: Thu, 15 Jul 1999 00:00
Date: Thu, 15 Jul 1999 00:00
22 lines
1284 bytes
1284 bytes
I am using a jTree and I'd like to set the cursor to WAIT_CURSOR when a node
is selected (I build the tree on the fly due to the number of nodes
possible).
Here's the code snippet
void tree_valueChanged(TreeSelectionEvent e)
{
tree.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
System.out.println("The cursor is "+tree.getCursor());
updateTheTree();
// tree.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
// commented out to verify that cursor is set.
}
I find that the cursor does not get set until AFTER the updateTheTree()
method even though the printout states that the cursor is a WAIT_CURSOR.
Any suggestions on how to force an update on the cursor so I don't have to
wait until the event is completed?
JoAnn
Technical Details
Message-ID:
<7mlk1b$67314@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,ab1c251b3dfcba85,start X-Google-Attributes: gid111d45,public From: "Bob Lemm" <rlemm@hiflite.com> Subject: jTree and Cursor Date: 1999/07/15 Message-ID: <7mlk1b$67314@forums.borland.com> X-Deja-AN: 501488395 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing