• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing JComboBox question  RSS feed

 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to populate a JComboBox such that the item that gets showed by default is empty textbox that would allow the user to type something in it. I want to show the other items in the drop down list.
How do I add the textbox that is editable?
I tried just doing the following:
mDayListComboBox.add(new JTextField());
Doesn't seem to work. Thanks!
Aruna
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Swing forum.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the Sun tutorial on combo boxes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!