Article View: borland.public.jbuilder.java.swing
Article #11181Re: JScrollbar event problem
From: Tor Iver Wilhelmsen
Date: Tue, 06 Jul 1999 00:00
Date: Tue, 06 Jul 1999 00:00
26 lines
1204 bytes
1204 bytes
"Marcel van den Dungen" <info@c-content.nl> writes:
> i'm having a problem when using the jscrollbar. whenever the end-user
> interacts with the jscrollbar a statechanged is fired. but when i manipulate
> the jscrollbar myself (e.g by using a setvalue call) the statechanged is
> also fired. can anyone please tell me how to go aroud this second firing?
in the component:
public boolean ignoreChange = false;
// ...
ignoreChange = true;
setValue
ignoreChange = false;
In the listener:
public void stateChanged(ChangeEvent evt) {
if (component.ignoreChange) return;
}
Note: This does not take into account such things as the user
manipulating the scrollbar while this is going on.
Technical Details
Message-ID:
<uemim5hdf.fsf@sds.no>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7lscqn$bi320@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,46361046639a4122 X-Google-Attributes: gid111d45,public From: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no> Subject: Re: JScrollbar event problem Date: 1999/07/06 Message-ID: <uemim5hdf.fsf@sds.no> X-Deja-AN: 497676072 Sender: towi@SDSA1761 References: <7lscqn$bi320@forums.borland.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing