configTree.getPopupMenu().add(configTree.getRefreshAction());
configTree.getPopupMenu().add(configTree.getRepainAction());
// Due to a bug in Swing, accelerators do not work for jPopupMenu. This is a workaround.
configTree.addKeyListener(new KeyListener() {
@Override
public void keyPressed(KeyEvent e) {
KeyStroke keyStroke = KeyStroke.getKeyStrokeForEvent(e);
JMenuItem menuItem;
ActionListener[] listeners;