getVerticalScrollBar(): This is method of JScrollPane class which is used to handle the vertical scrollbar of Java Swing. This method returns the vertical scrollbar object in the JScrollPane component of Java Swing.