int (JComponent component) { if (component instanceof JComboBox || component instanceof JSpinner || component instanceof JButton || component instanceof JTextField && ((JTextField)component).getColumns() != 0) { return NONE; } return HORIZONTAL; }