🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Disabling double clicks

#7881
From: Ernesto Bascon Pantoja
Date: Tue, 05 Dec 2000 00:00
29 lines
1427 bytes
Hi:

I have an application with several JButtons added to a JFrame, I have a
button that shows a JOptionPane when an "action performed" event occurs.

My problem is that if the user double-clicks his/her mouse, the
actionperformed is called twice and two JOptionPanes are shown.

I can "solve" this problem disabling the JButton after the first action
performed and enabling it after the JOptionPane is shown, but this
solution carries me several focus problems (and I think it is not a good
solution).

So, how can I help responding to the second mouse click over my
JButtons?
(I tried overriding the processMouseEvent method but it did not work).

Thanx in advance.

Saludos


Ernesto


-- 
-------------------------------------------------
Polimorf's Page: http://members.xoom.com/Polimorf
-------------------------------------------------
Technical Details
Message-ID: <3A2D4352.157A0C87@ucbcba.edu.bo>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,2042957e0f969a1d,start
X-Google-Attributes: gid111d45,public
From: Ernesto Bascon Pantoja <bascone@ucbcba.edu.bo>
Subject: Disabling double clicks
Date: 2000/12/05
Message-ID: <3A2D4352.157A0C87@ucbcba.edu.bo>
X-Deja-AN: 701469285
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: IIIA - pirAMide Project - UCB Cbba.
Mime-Version: 1.0
Reply-To: bascone@ucbcba.edu.bo
Newsgroups: borland.public.jbuilder.java.swing