What is the difference between
JScrollPane.getViewportBorderBounds()and
JScrollPane.getViewport()and
JscrollPane.getVisibleRect()
First two are returning same dimension.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
getViewportBorderBounds()returns Rectangle which represents the bounds of the viewport bordergetViewport()returns current JViewport.getVisibleRect()returns visible rectangle of the JScrollPane (including borders and scroll bars), which is inherited from JComponent.I don’t see any comparability among these three methods. They are telling you different things. Read for more details on http://docs.oracle.com/javase/7/docs/api/javax/swing/JScrollPane.html