Desktop Sharing in java

岁酱吖の 提交于 2019-12-08 14:46:49

问题


I want to create a very simple RMI code which just share the desktop.

I have created my classes and also remote interface.in the Share class ,I have an execute method which will return the image of the client's desktop.but I don't know that how can I get that image ?or how can i store it? please help me,thanks.

Share class:

class Share implements Task<DesktopPaneUI>,Serializable{
public Share(){

}

public DesktopPaneUI execute() {

}

}

Task class:

public interface  Task<T> {

T execute();
  }

回答1:


import java.awt.*
import java.awt.image.*


BufferedImage screenShot = new Robot().createScreenCapture(
        new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())
)


来源:https://stackoverflow.com/questions/2201894/desktop-sharing-in-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!