Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to widen the drop-down list in a JComboBox

843804Nov 11 2004 — edited Aug 27 2007
Is there some way to set the width of the drop-down list of a JComboBox? Note, this is not the same thing as setting the width of the JComboBox itself (vis-a-vis setBounds() or setSize()). I've got my JComboBox set as wide as possible, but the thing is the items in the list are dynamic and user defined, and there is no way to predict the width of the widest item. Does anyone know how to do this?

Gib
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 24 2007
Added on Nov 11 2004
7 comments
1,951 views