Get your CodeRanch badge!*
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/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I change the width of a JComboBox dropdown list?
 
Similar Threads
Drop-down: How can I make the list bigger than the drop down
JComboBox
Commands events or function calls between two containers
JComboBox item is cropped off side of drop down
drop down list display issue