Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to increase the width of JComboBox Display ??

 
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.......
 
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
 
There's a way to do it better - find it. -Edison. A better tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic