This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

--Using popup menus

Documents for the development of and with JVx.

--Using popup menus

Postby Development@SIB » Tue Oct 01, 2013 3:44 pm

This article is outdated - please use our new system at

If you need a popup menu for your table on right mouse click, simple add it. A short example:

Syntax: [ Download ] [ Hide ]
UIMenu menActions = new UIMenu("Actions");
UIMenuItem miInsert = new UIMenuItem("Insert");
UIMenuItem miDelete = new UIMenuItem("Delete");
UIMenuItem  miSearch = new UIMenuItem("Show");

UIPopupMenu popupMenu = new UIPopupMenu();

You should add a mouse event for your component, to show the popup (you also could add the event to an image or a panel):

Syntax: [ Download ] [ Hide ]
tblMaster.eventMousePressed().addListener(this, "doShowPopup");

and the listener method:

Syntax: [ Download ] [ Hide ]
public void doShowPopup(UIMouseEvent pEvent)
    if (pEvent.isPopupTrigger() )
    { , pEvent.getX(), pEvent.getY());
User avatar
Posts: 313
Joined: Mon Sep 28, 2009 1:54 pm

Return to Documentation