< import java.awt.*; import java.awt.event.*; import java.awt.Robot; import java.awt.AWTException; import java.awt.Rectangle; import java.awt.Color; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class GB{ public boolean checkColor(Color inputColor) { BufferedImage image = robot.createScreenCapture(rectangle); for(int x = 0; x < rectangle.getWidth(); x++) { for (int y = 0; y < rectangle.getHeight(); y++) { if (image.getRGB(x, y) == inputColor.getRGB()) { return true; } } } return false; { while (!checkColor(newColor)) { new Color = new Color(196, 195, 181); } } } >
anyway im getting 10 errors and they are all noobie errors but idk how to fix..
what i want to do is declare a method then check a new color against the method..
the errors are:
illegal start of expression
identifier expected
; expected
) expected