I want to have same prefferredSize() for all JComboBox i use. So I made an subclass to JComboBox and wrote setPrefferredsize( ... ). But i want to know how i can change the width of the drop-down list, that shows JComboBox items (wich is String-objects) to be wide as a widest String item. Because now, this drop-down list is wide as JComboBox.

Please if u know the answer, write details. Beacause I am not so very good in english. If u write an example it will help very much.