wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes How can I change the width of a JComboBox dropdown list? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How can I change the width of a JComboBox dropdown list?" Watch "How can I change the width of a JComboBox dropdown list?" New topic
Author

How can I change the width of a JComboBox dropdown list?

Omar Dawod
Greenhorn

Joined: Sep 19, 2013
Posts: 4
Hi guys!

I want to change the width of the JComboBox drop-down list, I want it wider than the JComboBox:
This is what I want to achieve:
---------------------
| Small JCombobox | V |
--------------------------------------------
| "Long item 1" |
--------------------------------------------
| "Long item 2" |
--------------------------------------------
| "Long item 3" |
--------------------------------------------

I found this, but it does not work on Java 7:
http://stackoverflow.com/questions/3969757/how-to-have-jcombobox-drop-down-list-which-is-wider-than-the-jcombobox-itself

Regards
Omar
Omar Dawod
Greenhorn

Joined: Sep 19, 2013
Posts: 4
I found the solution

http://tips4java.wordpress.com/2010/11/28/combo-box-popup/
 
 
subject: How can I change the width of a JComboBox dropdown list?