I have a Panel where I configure some preferences of the application. There ara about 200 preferences. (a preference is a JLabel plus a textfield/combobox/checkbox)
I would like to know if someone has implemented something like control-F in browsers. The search should go through all the labels and highlight the label(s) that contain the text.
You can use getComponents() method to get all components added to the Panel. Iterate through the array and check whether the current one is a JLabel instance. Then check JLabel's text and compare with the search string. If necessary label found highlight it (e.g. by changing text color or adding/removing colored line border). Then you can use the JLabel's bounds to make it visible in a scroll (if any).