Dimension () { // Existing usages (e.g. FontComboBox) ignore returned preferred width. // Calculating preferred width can be quite consuming though (in particular, when a large number of fonts is available), // so we avoid such a calculation here. return new Dimension(1, computePreferredHeight()); }