Hello... again. I'm sorry about asking about this again, but I'm still stumped =S I can't find any tutorials or examples on this matter*, and I don't know what to do. I still need to find a way to get commands to paint from one JVM to another. I tried passing a Graphics object through RMI, but it's not Serialized so it throws an Exception. This is probably a task too big for my level of Java knowledge, but I'm determined to get it working. I just need some help =S. Does anyone know of a tutorial or an example that talks about this type of thing? Or know of a way to get it working? Any help at all would be greatly appreciated.

*The problem is, I have an RMI "Server" that uploads an Object that is an arcade-like game. And an RMI "Client" that retrieves it. Everything works fine until I try to call the "Server"'s draw method from the "Client" (the method passes a Graphics object to the "Server"). I'm getting an exception about how the Graphics object isn't Serialized, so I can't send it through a Stream. Now I've ran out of ideas...


I came up with an Idea, and I would like some input on it.

In this scenario, would it make more sense to just open a standard Socket connection, and pass drawing info that way?

Here's an outline of a class that I was thinking about using to pass data. any sugestions?

import java.awt.*;

public class SocketDraw
    public void drawString(String s, int x, int y){}
    public void drawImage(String key, int x, int y, int w, int h){}
    public void drawPolygon(Polygon p){}
    public void drawRect(int x, int y, int w, int h){}
    public void drawOval(int x, int y, int r1, int r2){}
    public void fillRect(int x, int y, int w, int h){}
    public void fillOval(int x, int y, int r1, int r2){}
    public void setColor(Color newColor){};
    public void sendImages(SocImg[] imgs){}

class SocImg{
    private Image img;
    private String key;
    public SocImg(Image img, String s){/** Set vars */}
    //gettors & settors