Results 1 to 19 of 19

Thread: JComboBox -- Item is not in the list[Resolved]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Resolved JComboBox -- Item is not in the list[Resolved]

    I have a "dynamic" JComboBox. What I mean by that is items are removed and added on "the fly".

    The getSelectedIndex() is returning -1 when an item is selected. I looked this up and it indicates the selected item is not in the list....What in the world does that mean? The item was added to the ComboBox.

    One more thing, the getItemCount() does return the correct number of items..So I don't know why I can't get the selected item or get the selected index.


    So, can anyone help me with this?


    By the way, I've tried adding a revalidate call but that didn't work.
    Last edited by System_Error; Jul 7th, 2005 at 11:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width