How to make choices visible in a JComboBox?

Discussion in 'Java' started by Aaron Fude, Apr 1, 2008.

  1. Aaron Fude

    Aaron Fude Guest

    Hi,

    I'm writing a JComboBox with a custom Editor. The idea is that when
    the user inputs a string, the choices are narrowed down to match the
    input.

    When the user starts typing, how does one reveal the available
    choices? In other words, how does one make the choices open up as if
    the little "arrow down" next to the combo box is pressed?

    Many thanks in advance,

    Aaron
     
    Aaron Fude, Apr 1, 2008
    #1
    1. Advertisements

  2. Aaron Fude

    Rob Dennis Guest

    Have you taken a look at Glazed Lists
    (http://publicobject.com/glazedlists/)? Maybe they already do what you
    are trying to build.
     
    Rob Dennis, Apr 1, 2008
    #2
    1. Advertisements

  3. Chase Preuninger, Apr 1, 2008
    #3
  4. Aaron Fude

    Roedy Green Guest

    There is nothing there on the topic. You are getting dangerously close
    to being labeled a spammer.
     
    Roedy Green, Apr 1, 2008
    #4
  5. Aaron Fude

    Roedy Green Guest

    Another possible route is to use a JList which always displays all the
    choices.
     
    Roedy Green, Apr 1, 2008
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.