File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Omar Dawod
Greenhorn
Posts: 4
  • 0
  • 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
  • 0
  • 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/
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic