JList.getNextMatch() - HowTo

From: T E Schmitz (mail_at_numerixtechnology.de)
Date: 05/28/04


Date: Fri, 28 May 2004 15:13:25 +0100

Hello,

I have a sorted JList and I would like to select the item that matches
the user's keystrokes:

example list {"Cardiff", "Carlisle", "Edinburgh", "Glasgow",
"Liverpool", "London"}

'L' should select "Liverpool", 'Lo' "London".

I've seen a couple of postings from which I gather that this behaviour
is already implemented. But I am not quite sure whether I need to
implement a KeyListner and buffer the keystrokes and then call
getNextMatch() with the cached string?

I'd appreciate it if anyone could point me in the right direction.

-- 
Regards,
Tarlika Elisabeth Schmitz


Relevant Pages

  • JList.getNextMatch() - HowTo
    ... I've seen a couple of postings from which I gather that this behaviour ... implement a KeyListner and buffer the keystrokes and then call ... getNextMatchwith the cached string? ... Tarlika Elisabeth Schmitz ...
    (comp.lang.java.databases)
  • JList, JComboBox - first letter matching - how to set it up?
    ... "London"} ... I've seen a couple of postings from which I gather that this behaviour is ... KeyListner and buffer the keystrokes and then call getNextMatchwith the ... Tarlika Elisabeth Schmitz ...
    (comp.lang.java.gui)
  • Re: JList.getNextMatch() - HowTo
    ... > implement a KeyListner and buffer the keystrokes and then call ... > getNextMatchwith the cached string? ... This isn't a database question so it would be more appropriate for you to ... Rhino ...
    (comp.lang.java.databases)