• Post Reply Bookmark Topic Watch Topic
  • New Topic

HI anybody help me out

 
maha devan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I am having an applet that displays some diagrams in it. I have kept popup for each diagram. But when the diagram is close to the border of the applet my popup menu is getting cut.

Instead of the popup menu getting cut I want it to be displayed contained in the applet how to do it.

Advance Thanks
Mahadevan
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JPopupMenu has a setLocation(int, int) method. I haven't tried it, but what you probably want to do is when you click to get the context menu, determine how close the edge of your applet border is and adjust the location of the context menu appropriately.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!