tags:

views:

74

answers:

1

Hi, 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  A: 
import java.awt.*
import java.awt.image.*


BufferedImage screenShot = new Robot().createScreenCapture(
        new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())
)
Trevor Tippins
as available on a zillion websites worldwide...
Trevor Tippins