IDEA-162025 Unexpected focus-effect painting in ComboBox with custom JPanel-based editor

This commit is contained in:
Denis Fokin
2016-10-04 16:21:22 +03:00
parent f5914b40fe
commit 3bdacf1492
@@ -265,12 +265,14 @@ public class JBUI {
}
}
/**
* JComboBox<String> comboBox = new ComboBox<>(new String[] {"First", "Second", "Third"});
* comboBox.setEditable(true);
* comboBox.setEditor(JBUI.ComboBox.compositeComboboxEditor(new JTextField(), new JLabel(AllIcons.Icon_CE)));
*/
public static class ComboBox {
/**
* JComboBox<String> comboBox = new ComboBox<>(new String[] {"First", "Second", "Third"});
* comboBox.setEditable(true);
* comboBox.setEditor(JBUI.ComboBox.compositeComboboxEditor(new JTextField(), new JLabel(AllIcons.Icon_CE)));
*
* @param components an array of JComponent objects. The first one is the editable text component.
*/
public static ComboBoxCompositeEditor compositeComboboxEditor (JComponent ... components) {
return new ComboBoxCompositeEditor(components);
}