• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how do i capture screenshot via network in java swing

 
Shashika Thiran
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to get screenshot from another computer moniter via network.
I know how do it in same computer moniter.
like this

Dimension screenSize =
Toolkit.getDefaultToolkit().getScreenSize();
Rectangle rectangle = new Rectangle(0, 0, screenSize.width,screenSize.height);
Robot robot = new Robot();
BufferedImage image = robot.createScreenCapture(rectangle);

File file = new File("screen.png");
ImageIO.write(image, "png", file);

any one can help me to get screenshot via network....thanks.
 
salvin francis
Bartender
Posts: 1276
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple, Write a java program that captures a screen shot on current computer.

now let the program to execute in the client machine listening at a socket for a "sendPrintScreen" Request.

Make a server program that has the ability to send this request to client and get response as a file sent via the network.

use TCP Ip
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic