• Post Reply Bookmark Topic Watch Topic
  • New Topic

About JComboBox  RSS feed

 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to display a long messages in JComboBox and I do not want to increase the length of JComboBox.
I would like to keep the JComboBox length to standard length and when user clicks, I want to show the full length of the items in the drop down.
Thanks for the help
Sri
 
lavanya subramanian
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Sri Rangan
i don't know if this is the solution for your problem but
try JCombobox method setToolTipText() method
if you use this method when the mouse points the jcombobox item the full value will be shown.

lavanya
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the stepped combo example.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!