int () { // The original preferred size of `JComboBox` is calculated as a max of combobox items preferred sizes // (see `javax.swing.plaf.basic.BasicComboBoxUI#getDisplaySize`). // Please note that `getPreferredSize().width` cannot be used, because `getPreferredSize` might be overridden // to return a value different from "a max of combobox items preferred sizes". return super.getPreferredSize().width; }