sclass PopupMenuMaker { settable bool allowScrolling = true; settable MouseEvent event; settable IVF1 fillMenu; run { new JPopupMenu menu; int emptyCount = menu.getComponentCount(); fillMenu?.get(menu); if (menu.getComponentCount() == emptyCount) ret; if (allowScrolling) { menu = new JPopupMenu; JMenuScroller scroller = JMenuScroller.setScrollerFor(menu); scroller.fillMenu = toVF1(fillMenu); } menu.show(event.getComponent(), event.getX(), event.getY()); } }