How to build a popup like "navigate > test"

here is my code, idea popup "no matches found"

JBList l = JBList.newInstance()

JBMenuItem menuItem = new JBMenuItem(new AbstractAction("l 1") {
    public void actionPerformed(ActionEvent e2) {
        println("${Date.newInstance()}")
    }
});

JBPopupMenu menu = JBPopupMenu.newInstance()
menu.add(menuItem)
l.add(menuItem)

PopupChooserBuilder builder = PopupChooserBuilder.newInstance(l)
JBPopup p = builder.createPopup()
p.showInFocusCenter()

Please sign in to leave a comment.