🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #55

Re: JButton events tricker twice

#55
From: Kevin Dean [TeamB]
Date: Fri, 25 Nov 2005 15:11
28 lines
2271 bytes
Benedict wrote:

>
>I have a JButton on my form that calls an actionPerformed event when 
>clicked.  I perform some routines in it and everything works fine except 
>for some reason the event is always trickered twice when the button is 
>clicked. Any idea what could cause this and how to stop it from happening.

Put a breakpoint in the event handler.  When the breakpoint is triggered, 
press the green "Go" arrow at the bottom left to let the program continue 
running.  When the breakpoint is triggered for the second time, look at 
the "Stack" tab in the debugger to investigate the stack trace.  The odds 
are that you are indirectly calling the event handler recursively, perhaps 
by modifying the control in some way that is triggering the event a second 
time.

-- 
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <xn0ea5qx47q2g0001-kdean@www.teamb.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43873391$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,498f63d4e8842664
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Kevin Dean [TeamB]" <NkOdSePaAnM@datadevelopment.com>
Subject: Re: JButton events tricker twice
Newsgroups: borland.public.jbuilder.java.swing
References:  <43873391$1@newsgroups.borland.com>
Organization: Dolphin Data Development Ltd.
User-Agent: XanaNews/1.17.6.6
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobrp]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
Message-ID: <xn0ea5qx47q2g0001-kdean@www.teamb.com>
X-Ref: newsgroups.borland.com ~XNS:000003BB
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
NNTP-Posting-Host: 199.243.78.163
Date: 25 Nov 2005 08:11:47 -0700
X-Trace: newsgroups.borland.com 1132935107 199.243.78.163 (25 Nov 2005 08:11:47 -0700)
Lines: 28
X-Authenticated-User: kdean
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail