Article View: borland.public.jbuilder.java.swing
Article #8139JSlider can't trap slider release
From: Audrey Seymour
Date: Mon, 16 Oct 2000 00:00
Date: Mon, 16 Oct 2000 00:00
25 lines
1455 bytes
1455 bytes
Hello all,
I'm having trouble capturing the event of a JSlider drag ending.
Although I copied the text from the java.sun.com tuturials on
sliders, which uses the following source clip in the ChangeListener
in order to catch the last value selected with a slider,
in a JBuilder 3.5 Foundation debug session, I never get
a state change where the value is not adjusting. However,
I do get many state changes when the value is still adjusting.
What's wrong here?
=======================================================================
public void stateChanged(ChangeEvent e)
{
JSlider source = (JSlider)e.getSource();
if (!source.getValueIsAdjusting())
{
// I never get here!
}
}
=======================================================================
Thanks!
Audrey Seymour
Resolution Sciences Corporation - http://www.resolve3d.com
audrey@resolve3d.com
Technical Details
Message-ID:
<39EB82B0.4226ECBC@ndtr.org>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,a6741f3d83c106ed,start X-Google-Attributes: gid111d45,public From: Audrey Seymour <audrey@ndtr.org> Subject: JSlider can't trap slider release Date: 2000/10/16 Message-ID: <39EB82B0.4226ECBC@ndtr.org> X-Deja-AN: 682245171 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 16 Oct 2000 15:23:35 -0800, 208.176.155.61 MIME-Version: 1.0 Reply-To: audrey@resolve3d.com Newsgroups: borland.public.jbuilder.java.swing