I've error in getDefaultToolkit and CreateRobot() while building robot class in android as same as java for capturing screen?
<pre><code> Toolkit toolkit =Toolkit.getDefaultToolkit();
               if (toolkit instanceof ComponentFactory) {
                   peer = ((ComponentFactory)toolkit).createRobot(this, screen);
                }
</code></pre>

<p>In above code i've error in 1st and 3rd line.</p>
