Fast way to find visible components in JScrollPane
问题 Given a JScrollPane containing a thousand components using some LayoutManager . Each component can be either in a loaded or unloaded state. There are not enough resources for all to be loaded. I'd like to have only the visible components load() ed in memory, and the invisible components unload() ed. When the user scrolls, a listener needs to keep updating the components' states: unload() the previously visible, and load() the newly visible. At any given moment, how do I know which components