Hi. I have simple JList with ordered list of Strings (let's say song names for example). I found out that quick keyboard typing automatically searches prticular line. Am I able to modify that behavior ? Let's say I need to add on the beginning of each line some visible metadata ([mp3], [wav], [mpa],...) which makes the searching stop working. I would like to start searching at first char after ']' (sorting will not change). Is it possible ? Thanks.
- probably will be problem for another --->
What are you trying to achieve, I'm fail to understand what you are asking exactly, not clear something from your question, nor for JComponents and its basic properties or methods implemented in API
- </Slovak language, short version ---> ani prd tomu nerozumiem/>
- for better help sooner post an SSCCE, short, runnable, compilable, just about a.m. issue, e.g. JFrame with JList, with hardcoded value (let's say song names for example) for DefaultListModel
I may be missing something, but I don't see any way that posted code snippet would ignore prefixed metadata like [mp3], [wav], [mpa]. I would use a regex in a getNextMatch override to ignore any prefix enclosed in square brackets. This requires just one method and two lines added to the JList code.