title: Change height of JCombobox
body: <p>Is it possible to increase the height of a <code>JComboBox</code>?(not refering to the popup menu)</p>
  
  <p>Have tried:</p>
  
  <pre><code>comboBox.setPreferredSize(new Dimension(200, 100));
  </code></pre>
  
  <p>and </p>
  
  <pre><code>Component[] comp = comboBox.getComponents();
  for (int i = 0; i &lt; comp.length; i++) {
      if (comp[i] instanceof JButton) {
          JButton btn = (JButton) comp[i];
          btn.setPreferredSize(new Dimension(200, 100));
  
      }
  }
  </code></pre>
  
  <p>But no luck. 
  Then I tried to fix the problem with layout managers:</p>
  
  <pre><code>JPanel panel = new JPanel(new GridBagLayout());
  panel.setPreferredSize(new Dimension(100, 100));
  GridBagConstraints c = new GridBagConstraints();
  c.weighty = 1;
  c.fill = GridBagConstraints.VERTICAL;
  panel.add(cbox, c);
  </code></pre>
  
  <p>But this dose not seems to change the size of the <code>JComboBox</code> button.</p>
  
  <pre><code>public class ComboBoxFontChange extends JFrame {
  
      public ComboBoxFontChange() {
  
          // CREATE BOX
          JComboBox&lt;String&gt; cbox = new JComboBox&lt;String&gt;();
          cbox.setFont(cbox.getFont().deriveFont(30.0f));
  
          // TRY CHANGE SIZE: DOSE NOT WORK..
          cbox.setPreferredSize(new Dimension(200, 100));
          cbox.setSize(new Dimension(200, 100));
          cbox.setMinimumSize(new Dimension(200, 100));
  
          // TRY CHANGE SIZE ON BUTTON INSTEAD: DOSE NOT WORK..
          Component[] comp = cbox.getComponents();
          for (int i = 0; i &lt; comp.length; i++) {
              if (comp[i] instanceof JButton) {
                  JButton btn = (JButton) comp[i];
                  btn.setPreferredSize(new Dimension(200, 100));
                  btn.setSize(new Dimension(200, 100));
                  btn.setMinimumSize(new Dimension(200, 100));
              }
          }
          cbox.addItem("Quarter");
          cbox.addItem("Nickel");
          cbox.addItem("Penny");
          JPanel panel = new JPanel();
          panel.add(cbox);
  
          getContentPane().add(panel);
  
      }
  
      public static void main(String[] args) {
          ComboBoxFontChange frame = new ComboBoxFontChange();
          frame.setSize(300, 150);
          frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
          frame.setVisible(true);
      }
  }
  </code></pre>