on-internet
← Community

Speed improvement of highlighting matching term in filterable JComboBox

Stack Overflow ·

I made custom class for filterable JComboBox. I tried with 10000 items and it works pretty well (nothing is laggy) although I won't even need that much items for my usecase. Then I tried implementing highlighting of a matching term. Idea is to match string that I'm typing in textfield to part of item and to highlight that matching part. I implemented it and it works but the problem is that it is laggy (takes a lot of time to open popup and to highlight items) when combobox has apx. 1000 items and more. How can I improve speed so that it is not laggy? FilterableComboBox import javax.swing.*; im

Comments

Sign in or sign up to comment and upvote.

No comments yet.