Q:

Paint App Cannot Send to Local Server

I am writing a Paint App for a CS class and I cannot get it to send data to the server.  It is supposed to connect to a server so multiple clients can work on the same painting together but I cannot seem to send the new object to the server.  I know it connects to the server because its give feedback on both ends when a connection is established but the ObjectOutputStream.writeObject cannot reach the server.  Please let me know what I'm missing!  Thanks, everyone! 
private ArrayList<PaintObject> shapes = new ArrayList<PaintObject>();
private Point startDrag, endDrag;
private ColorShapeSelectorJPanel colorShapeChooserArea = new ColorShapeSelectorJPanel();
private PaintObject currPaintObj = null;
private Socket socket;
private ObjectOutputStream oos;
private ObjectInputStream ois;

private static final String ADDRESS = "localhost";

public PaintingField() {
    this.setBackground(Color. WHITE);
    this.setSize(2000, 1400);
    this.openConnection();
    initializeListeners();

}

// Establish connection with the server. 
private void openConnection() {
    /* Our server is on our computer, but make sure to use the same port. */ 
    try {
        // Connect to the Server
        socket = new Socket(ADDRESS, Server. SERVER_PORT);
        oos = new ObjectOutputStream(socket.getOutputStream());
        ois = new ObjectInputStream(socket.getInputStream());
        System.out.println("Connected to server at " + ADDRESS + ":" + Server. SERVER_PORT);
    } catch (IOException e) {
        // e.printStackTrace();
        this.cleanUpAndQuit("Couldn't connect to the server");
    }

}

// Remove connection with server
private void cleanUpAndQuit(String string) {
    JOptionPane.showMessageDialog(PaintingField.this, string);
    try {
        if (socket ! = null)
            socket.close();
    } catch (IOException e) {
        // Couldn't close the socket, we are in deep trouble.  Abandon ship. 
        e.printStackTrace();

    }
}

// Get listeners running
private void initializeListeners() {
    this.addMouseListener(new MouseAdapter() {
        // Begin dragging the shape
        public void mousePressed(MouseEvent evnt) {
            startDrag = new Point(evnt.getX(), evnt.getY());
            endDrag = startDrag;
            repaint();
        }

        // When mouse is released, get the shape
        @Override
        public void mouseReleased(MouseEvent evnt) {

            // If rectangle...
            if (colorShapeChooserArea.isRectangleSelected()) {
                currPaintObj = new PaintObject(makeRectangle(startDrag.x, startDrag.y, evnt.getX(), evnt.getY()),
                        colorShapeChooserArea.getColor(), false);
            }

            // If ellipse...
            else if (colorShapeChooserArea.isEllipseSelected()) {
                currPaintObj = new PaintObject(makeEllipse(startDrag.x, startDrag.y, evnt.getX(), evnt.getY()),
                        colorShapeChooserArea.getColor(), false);
            }

            // if line
            else if (colorShapeChooserArea.isLineSelected()) {
                currPaintObj = new PaintObject(makeLine(startDrag.x, startDrag.y, evnt.getX(), evnt.getY()),
                        colorShapeChooserArea.getColor(), false);
            }

            // if doge
            else if (colorShapeChooserArea.isImageSelected()) {
                currPaintObj = new PaintObject(makeRectangle(startDrag.x, startDrag.y, evnt.getX(), evnt.getY()),
                        Color. WHITE, true);
            }

            // Send the object to the server
            // TODO: FIXME: oos.writeObject NOT SENDING!!! 
            try {
                /* Someone pressed enter?  Send the message to the server! */ 
                oos.writeObject(currPaintObj);
            } catch (IOException ex) {
                PaintingField.this.cleanUpAndQuit("Couldn't send a message to the server");
            }

            shapes.add(currPaintObj);
            startDrag = null;
            endDrag = null;
            repaint();

        }

    });

    this.addMouseMotionListener(new MouseMotionAdapter() {
        public void mouseDragged(MouseEvent evnt) {
            endDrag = new Point(evnt.getX(), evnt.getY());
            repaint();
        }
    });

}

The problem line is marked "// TODO: FIXME:" The goal has been to notify and send to the server when the mouse is released. 

A:

---- [SOLVED] ---- 
I had a few problems:
Firstly: I had created a private ServerListener class within the same class which the code above is from BUT I hadn't created an instance of it in the constructor.  Dumb.  I know. 
Secondly: The object that I was sending over to the server (PaintObject) wasn't serializable.  An object must be serializable to be sent using ObjectOutputStream.writeObject.  The public PaintObject class now begins:
public class PaintObject implements Serializable {

Those were the issues.  I just thought I would be a good internet citizen and answer my own question when I cracked it.  I hope this helps some on the future.