void () { JComponent selectedTab = myTabbedPaneWrapper.getSelectedComponent(); setOKActionEnabled(selectedTab != null && (selectedTab == myByFilePanel.getPanel() || myByClassPanel != null && selectedTab == myByClassPanel.getPanel() || myView.getSelectedItem() != null)); }