Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getting jcombobox mouse over value  RSS feed

 
Mohamed Jeleel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people.

I have a combo box in my panel and have values in it.
I want to get the selection value not the selected value when I moving the mouse through the combobox.

 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a custom renderer. The renderer is invoked everytime a row needs to be repainted. So you can save the value of the last selected item that was rendered

Just noticed your cross posting: http://stackoverflow.com/questions/2826450/getting-jcombobox-mouse-over-value

Be Forthright When Cross Posting To Other Sites
 
Mohamed Jeleel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I used a renderer but it gets invoked so many times.
I need only is, if I go through the list item it gets selectioned then I need a call.
Is there any way to get that call only.

@Be Forthright When Cross Posting To Other Sites

Yeah now I understand. Didnt think about that so much
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not clear on what you want. Your topic subject seems to indicate that you want to get the value when you move your mouse of the combo box (which doesn't make sense to me), but your post seems to indicate that you want to get the value when the user selects one from the drop-down.

Can you please be more specific. I understand there may be a language barrier here, so try to use more than the minimal number of words and perhaps provide an example.

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