Article View: borland.public.jbuilder.java.swing
Article #8761Re: JComboBox Event Never Raised !
From: Paul Furbacher [TeamB]
Date: Wed, 19 Jul 2000 00:00
Date: Wed, 19 Jul 2000 00:00
29 lines
1548 bytes
1548 bytes
Velu Erwan wrote:
>
> I'm using JBuilder 2 with a jdk 1.1.6 or 1.1.8 but i've one problem.
> I have a JComboBox and i want to put code on the onclick Event but it
> doesn't work.
> This event is never raised !
>
> Here it comes my source code:
>
> jComboBox1.addMouseListener(new java.awt.event.MouseAdapter() {
> public void mouseClicked(MouseEvent e) {
> jComboBox1_mouseClicked(e);
> }
> this.add(jComboBox1, new XYConstraints(53, 61, 161, 18));
>
> void jComboBox1_mouseClicked(MouseEvent e) {
> System.out.println("Combo Clicked");
> }
>
> If some could help me ?
As has been pointed out -- even quite recently in these newsgroups --
the JComboBox is a compound control. So, even though you add the
listener, it's possible that a sub-component is swallowing the
event. You'll have to do some digging into the code for JComboBox
to see just which sub-component may be doing this.
Paul Furbacher (TeamB)
Technical Details
Message-ID:
<3975DE09.CA2FB6EF@home.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8kvp3b$c0r5@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,c489b865d78a2501 X-Google-Attributes: gid111d45,public From: "Paul Furbacher [TeamB]" <pnf@home.com> Subject: Re: JComboBox Event Never Raised ! Date: 2000/07/19 Message-ID: <3975DE09.CA2FB6EF@home.com> X-Deja-AN: 648263871 Content-Transfer-Encoding: 7bit References: <8kvp3b$c0r5@bornews.borland.com> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii Organization: Reverse Alchemy, Inc. Mime-Version: 1.0 Reply-To: pnf@home.com Newsgroups: borland.public.jbuilder.java.swing