• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JComboBox - a constant size

 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Started working on my assignment again after a looooooong time.

I have a pretty basic question now.
I am using a JCombobox in my JPanel layout to implement the Search functionality. It expands to fit in the largest entry in the list.

Is there a way I could make it a constant size, so that irrespective of the data entries, it just shows a constant width?
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a setting on thge combobox for the max visible entries, have a squizz at the javadoc for what it is but it makes the combo box scroll so you can see the other entries.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic