Article View: borland.public.jbuilder.java.swing
Article #8160need help with JSlider event capture
From: Audrey Seymour
Date: Wed, 18 Oct 2000 00:00
Date: Wed, 18 Oct 2000 00:00
25 lines
1400 bytes
1400 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
audrey@resolve3d.com
Technical Details
Message-ID:
<39EE0FC2.EA6DE10A@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,c4bec3bca5ad0a87,start X-Google-Attributes: gid111d45,public From: Audrey Seymour <audrey@ndtr.org> Subject: need help with JSlider event capture Date: 2000/10/18 Message-ID: <39EE0FC2.EA6DE10A@ndtr.org> X-Deja-AN: 683054881 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 18 Oct 2000 13:49:54 -0800, 208.176.155.61 MIME-Version: 1.0 Reply-To: audrey@resolve3d.com Newsgroups: borland.public.jbuilder.java.swing