1. Why should the classes you design be as general as possible?
2. Consult the documentation for the class JFrame in the Java Class Library.
a. From which class does JFrame inherit the method pack?
b. What four constants can you pass to the method setDefaultCloseOperation?
3. Write statements that will draw three squares side by side. First, draw the leftmost square using the current pen color.
Next, draw the middle square in blue. Finally, draw the rightmost square using the same color as the leftmost square.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here