Question:
Is there a way to find out the first visible row in a List?
Answer:
The standard AWT java.awt.List class does not provide a means for determining the first visible row in a list. However, the Swing package, which is now standard in Java 1.2, provides this functionality in javax.swing.JList. To determine theindex of the first visible row in a JList, simply call getFirstVisibleIndex(). You can also determine the last visible row by invoking getLastVisibleIndex(). You willgenerally find that the Swing classes provide you with greater functionality and flexibility than the core AWT package.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.






















