JComponent (JPanel parent, Tree tree) { DefaultActionGroup group = new DefaultActionGroup(); group.add(new SetAsRootAction(tree)); AnAction back = new GoBackwardAction(); back.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.ALT_MASK)), parent); group.add(back); AnAction forward = new GoForwardAction(); forward.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.ALT_MASK)), parent); group.add(forward); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("DebuggerTreeWithHistory", group, true); toolbar.setTargetComponent(tree); return toolbar.getComponent(); }