import java.awt.*; public class Robot2 extends Frame{ Image pilt; public Robot2(){ try{ Robot r=new Robot(); pilt=r.createScreenCapture(new Rectangle(0, 0, 400, 300)); setSize(300, 200); setLocation(200, 100); setVisible(true); }catch(Exception e){} } public void paint(Graphics g){ g.drawImage(pilt, 0, 0, this); } public static void main(String argumendid[]){ new Robot2(); } }