public void onMouseDrag(Location point) { new Line(nextLineStarts, point, canvas); nextLineStarts = point; // What if this line is gone? // Where will all lines start? }
new Color(redness, greenness, blueness); This allows the mixing of a new color. Each parameter must be a value between 0 and 255. Thus there are 256 different levels of redness that can be chosen when you are mixing a color. With 256 levels of greenness, and 256 levels of blueness, we have a possibility of 16 million+ different colors. 3 256 ^ 3 = 256 * 256 * 256 = 16,777,216 = 256 To get the color RED, you would do this: new Color(255, 0, 0); To get the color PURPLE, we would use ---- new Color(255, 0, 255); To get the color YELLOW, use ---- new Color(255, 255, 0); To get a LIGHT GRAY color, use ---- new Color(212, 212, 212); BLACK new Color(0, 0, 0); WHITE new Color(255, 255, 255);