Возврат ошибки внешнего метода

boolean openingboard;
{   
Robot robot = new Robot();
Color color3 = new Color(108, 25, 85);
Rectangle rectangle = new Rectangle(0, 0, 1365, 770);
    while(true)
    {
    BufferedImage image = robot.createScreenCapture(rectangle);
    search: for(int x = 0; x < rectangle.getWidth(); x++)
        {
        for(int y = 0; y < rectangle.getHeight(); y++)
            {
                if(image.getRGB(x, y) == color3.getRGB())
                {
                    System.out.println("About to finish and return true");
                    return true;
                }
                System.out.println("About to finish and return false");
            }
        }
    }
}

ошибка: java: 71: return external method

return true

^

Я не знаю, что это происходит, пожалуйста, помогите!

8
задан user1179522 16 February 2012 в 02:25
поделиться