• Post Reply Bookmark Topic Watch Topic
  • New Topic

JList inside JComboBox?  RSS feed

 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to put JList inside a JComboBox, or make data appear in JComboBox in the following manner:
JCB Item 1
- one
- two
JCB Item 2
- three
- four

thanks,
Alex
 
Serghei Jelauc
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think it is possible, but you need to create at least your own renderer for JComboBox. If you need to haave possibility to edit rows in your JComboBox - you need in addition to create an editor.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!