Article View: borland.public.jbuilder.java.swing
Article #12126Re: URGENT!! Exception with JPopup
From: Anne JANSSENS
Date: Tue, 16 Feb 1999 00:00
Date: Tue, 16 Feb 1999 00:00
33 lines
1596 bytes
1596 bytes
I have already had a similar exception message of event dispatching (see my
message to the newsgroup 11-02-99)
I'am using a JPopupMenu and have no problem, have you try to use a debugger
?
I have found that for my problem an objet was not initialised and that the
program is lost and enter the processKeyEvent method of JComponent !
I see by your message that you're mixing swing and jbcl, it brings no
problem ?
Hope it could help, :)Anne
Here is the code i am using to show a JPopupMenu :
public class my_panel JPanel
{
public my_panel()
{ super();
enableEvents(AWTEvent.MOUSE_EVENT_MASK);
}
public void processMouseEvent(MouseEvent e)
{
if (e.isPopupTrigger())
{ JPopupMenu popup = new JPopupMenu("essai");
popup.setInvoker(this);
popup.add(new JMenuItem("coucou"));
popup.add(new JMenuItem("coucou2"));
popup.show(popup.getInvoker(),e.getX(),e.getY());
}
}
Technical Details
Message-ID:
<7abbgp$61016@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7a19a7$p0l2@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,ea0134e9d1f938c7 X-Google-Attributes: gid111d45,public X-Google-Thread: f5619,ea0134e9d1f938c7 X-Google-Attributes: gidf5619,public From: "Anne JANSSENS" <recherche@generix.fr> Subject: Re: URGENT!! Exception with JPopup Date: 1999/02/16 Message-ID: <7abbgp$61016@forums.borland.com> X-Deja-AN: 444877288 References: <7a19a7$p0l2@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing,borland.public.jbuilder.jbcl