• Post Reply Bookmark Topic Watch Topic
  • New Topic

restrict the length of a JComboBox

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I have a JComboBox with some input in it and the length of the panel is set by the longest input.

example:
values in myJComboBox:

New York
New Mexico
US Ilsands and the caribians

Since the last input is the longest (length) , the panel I'm using it on - expends.

Quesiton: How can I keep the correct length of the panel while not changing the values in the jComboBox?

thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!