Johanna
Johanna

Reputation: 27660

Desktop Sharing in java

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();
  }

Upvotes: 0

Views: 341

Answers (1)

Trevor Tippins
Trevor Tippins

Reputation: 2847

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


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

Upvotes: 1

Related Questions