void (JComponent component) { @NlsSafe String actionName = "FCB_DOWN"; Action action = new AbstractAction(actionName) { private static final long serialVersionUID = -4133513199725709434L; @Override public void actionPerformed(ActionEvent e) { // if popup is not visible, just make it visible. // if popup has not the focus, pass it the focus // else: move down! if (popup.isVisible()) { if (popup.isPopupFocused()) { popup.selectDown(false); } else { popup.setPopupFocused(true); } } else { showChoices(); } } }; component.getActionMap().put(actionName, action); component.getInputMap(JComponent.WHEN_FOCUSED) .put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), actionName); }