JPanel (boolean editor, AnAction changeAction) { JComponent comboComponent = ((CustomComponentAction)changeAction).createCustomComponent( changeAction.getTemplatePresentation(), ActionPlaces.UNKNOWN); JPanel panel = new JPanel(new BorderLayout()) { @Override public Color getBackground() { // track "Table.selectionInactiveBackground" switch Container parent = getParent(); return parent instanceof JTable ? ((JTable)parent).getSelectionBackground() : super.getBackground(); } }; panel.add(comboComponent, BorderLayout.CENTER); comboComponent.setOpaque(false); DataContext dataContext = SimpleDataContext.getProjectContext(myProject); AnActionEvent event = AnActionEvent.createFromAnAction(changeAction, null, ActionPlaces.UNKNOWN, dataContext); changeAction.update(event); panel.revalidate(); if (!editor) myResetRunnables.add(() -> changeAction.update(event)); return panel; }