Desktop Sharing in java
I want to create a ve开发者_C百科ry 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();
}
import java.awt.*
import java.awt.image.*
BufferedImage screenShot = new Robot().createScreenCapture(
new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())
)
精彩评论