Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to increase the width of JComboBox Display ??  RSS feed

 
Shanmugam Muthukumarasamy
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a weird requirement, I need to increase the width of the combo box display as equivalent to the maximum width of the string item in it. This would happen when I click on the combo box.

Any Help.........

Thanks.......
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you can use this test app to show us how your JComboBox isn't working.
 
Shanmugam Muthukumarasamy
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Craig,

Thank you for your help, but my requirement is not actually changing the size of the combo box.

See when we click on the combo box, it will show up all of its values in the popup window, I want increase the size of that popup window based on the size of the value in it. But actually, the size of the combo box never changed.

Do you have any idea ...

Thanks,
Shan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!