• Post Reply Bookmark Topic Watch Topic
  • New Topic

Keeping JComboBox Visible  RSS feed

 
Paul McKenna
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have a JComboBox within which I have embedded JCheckBox components using a ListCellRenderer. It works well except for one problem
Everytime the user selects/deselects an item in the JComboBox the popup rolls back. Hence the user to open the ComboBox for every item that needs to be selected. Is there anyway to prevent the Combo Box from rolling back automatically?
Thanks in advance
Regards
PMC
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using multiple selection, why not use a JList instead?
 
Paul McKenna
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I would use a JList, but I have very heavy space constraints. So I am forced to use a JComboBox with a renderer to display CheckBoxes.
Is there any listener/event I can override to prevent the combo box from rolling back?
Thanks
PMC
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!