• Post Reply Bookmark Topic Watch Topic
  • New Topic

JComboBox ActionListener not reacting

 
Sebastiaan Kortleven
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have a JComboBox and I fill it with a custom-made object (String name, Long rowid). The JComboBox nicely shows the value returned by my toString method, but when I change the selection, no action event is thrown..
If I fill the jcombobox with simple Strings, all works well...
Is there another method I need? Or do I need to write my own listcellrenderer?
 
Sebastiaan Kortleven
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My equals method was incorrect.. it returned true too easy.. so the different items in the JComboBox are not recognized as different items
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!