Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Omar Dawod
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the solution

http://tips4java.wordpress.com/2010/11/28/combo-box-popup/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic