JComponent () { mySignatureArea = createSignaturePreviewComponent(); JPanel panel = new JPanel(new BorderLayout()); panel.add(SeparatorFactory.createSeparator(RefactoringBundle.message("signature.preview.border.title"), null), BorderLayout.NORTH); panel.add(mySignatureArea, BorderLayout.CENTER); mySignatureArea.setPreferredSize(new Dimension(-1, 130)); mySignatureArea.setMinimumSize(new Dimension(-1, 130)); mySignatureArea.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { Container root = findTraversalRoot(getContentPane()); if (root != null) { Component c = root.getFocusTraversalPolicy().getComponentAfter(root, mySignatureArea); if (c != null) { IdeFocusManager.findInstance().requestFocus(c, true); } } } }); updateSignature(); return panel; }