When setting up a JScrollPane, do you have to invoke both of the methods
setHorizontalScrollBarPolicy and setVerticalScrollBarPolicy?
In Display 18.7, we listed the constructor for JScrollPane as follows:
public JScrollPane(Component objectToBeScrolled)
This indicates that the argument to the constructor must be of type Component.
But we used the constructor with an argument of type JTextArea. Isn’t this
some sort of type violation?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here