This content has been marked as final. Show 4 replies
I would put the labels into an array and loop through the array.
Or were you asking for free software?
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).
ok, I will try it !
If you think asnwer is suitable please mark is as "correct" to help other readers select proper ones.