Advertisement
liangm20

Unit 4

Oct 23rd, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Unit 4
  2. 5. static field of class Color
  3. 10. 256
  4. 11. blue
  5. 16. g.setColor(Color.RED);
  6. 23. should be Color.GREEN, not just GREEN
  7. 24. COBALT isn't one of the static constants for Color class; would have to create a constructor and instantiate a custom color for COBALT
  8. 25. needs parentheses around Color.RED
  9. 29. in the Color constructor, all values must be integers; change double 1.4 to an integer value
  10. 30. Java is case-sensitive, and since "Blue" isn't capitalized, it doesn't find it as the static constant of the Color class. fix by making "Blue" into all caps, and by putting parentheses around Color.BLUE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement