Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Components inside JComboBox

 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need to have a JComboBox in this fashion. On selecting the drop down,

checkbox1 text1
checkbox2 text2
.
.
.
checkboxn textn


should be displayed.

Iam very new to Swing/Awt UI stuff and I figured out that I need to add a component inside the JCombobox I create. I Don't know if I can achieve this by adding a JCheckBox component or I need to create a JPanel for this.

I have created many JCheckBox components and tried to add it and display but nothing was visible inside the JComboBox I created. I don't know how to change the default renderer for the JComboBox and make it render this kind of JComboBox.

Please take a look at the code I have written.


Any Help would be deeply appreciated and please forgive me if my code was dumb.
[ June 02, 2006: Message edited by: Arun Kumarr ]
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Craig.
You have made me watch the climax. I'll have to find out how exactly the renderer is working. :roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic