🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18463

Re: ItemStateChanged fires twice?

#18463
From: Alex Humphreys
Date: Wed, 24 Jun 1998 00:00
52 lines
2163 bytes
thanks, Rich, you're a helpful guy.  (I'm still getting the hang of swing,
if you'll pardon the expression).

Richard Wilkman wrote:

> Alex:
>
> That's exactly what it's supposed to do.  You get one for the item
> that is getting de-selected (it's state changed) and one for the item
> getting selected (it's state changed).  You need to do your own
> filtering in your events so that your code executes only when you want
> it to.  Something like:
>
> void choiceChanged(ItemEvent e){
>
>  if(e.getStateChange() == ItemEvent.SELECTED){
>    // do whatever
>  }
>
> }
>
> -Rich
>
> Alex Humphreys wrote:
> >
> > I have a JdbComboBox with an ItemStateChanged event.  Problem is that
> > when I choose an option in the comboBox, it fires the ItemStateChanged
> > event TWICE.  It runs all the way through it once, and then goes into
> > some jdbComboBox code and then the event gets fired again.  What's
> > happening?  This didn't happen before I was using Swing.
> >
> > Any ideas?  I can provide code if that would be helpful....
> >
> > Thanks.
> >
> > Alex
>
> --
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Rich Wilkman
> Senior Quality Assurance Engineer
> Borland JBuilder Team
>
> If you see something that looks like an opinion up there,
> it's mine and mine alone.
>
> Mail sent to me from the newsgroups won't bounce but will
> be ignored.  If I have time, I'll respond, but you  have
> a better chance if you confine your posts to the newsgroups
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <35911418.EE529E56@sema4.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <358FD1C9.F07DEE56@sema4.com> <35902823.DC127EC0@inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,2937d74bbbd3557f
X-Google-Attributes: gidf74b3,public
From: Alex Humphreys <ahumphreys@sema4.com>
Subject: Re: ItemStateChanged fires twice?
Date: 1998/06/24
Message-ID: <35911418.EE529E56@sema4.com>
X-Deja-AN: 365661128
Content-Transfer-Encoding: 7bit
References: <358FD1C9.F07DEE56@sema4.com> <35902823.DC127EC0@inprise.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language