🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages Started by Lans Redmond Fri, 16 Jan 2004 23:37
JPopupMenu and Applets
#1352
Author: Lans Redmond
Date: Fri, 16 Jan 2004 23:37
11 lines
1234 bytes
I have an applet that I need to know add a popup menu, I have added the following code to the MouseRelease Event

if ( menu.isPopupTrigger(e))
  System.out.println("MouseEvent Triggered");
  int x = x.getX();
  int y = y.getY();
  menu.show(e.getComponent(),x,y);


when I check the java console , I see that the even is being fired because I see the printout I did.  My problem is when the event is fired I do not see the popup menu.
Re: JPopupMenu and Applets
#1360
Author: Tad Frysinger [TeamB]
Date: Tue, 20 Jan 2004 04:32
18 lines
1684 bytes
Lans Redmond wrote:

> I have an applet that I need to know add a popup menu, I have added the following code to the MouseRelease Event
> 
> if ( menu.isPopupTrigger(e))
>   System.out.println("MouseEvent Triggered");
>   int x = x.getX();
>   int y = y.getY();
>   menu.show(e.getComponent(),x,y);
> 
> 
> when I check the java console , I see that the even is being fired because I see the printout I did.  My problem is when the event is fired I do not see the popup menu.
> 
Does the menu actually have JMenuItems in it? Did you actually mean to 
post e.getX() and e.getY()? If not, do the values in x and y make sense?

-- 
Tad Frysinger [TeamB]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads