Saving an Object that has been painted

I have two classes (A Paint class and a Save Object Class). I want to be able to save the image that has been drawn to a file through a menu option. Below is the code I have. I get an error message telling me that it "Cannot Resolve Symbol". It points to the "SaveObject();" line. Could someone tell me if I'm going about this the right way and if so, why do I ge that error message.

***********Paint Class************

private JMenuItem createFileOptionSave()

{

final JMenuItem optionSave = new JMenuItem("Save");

optionSave.addActionListener

(

new ActionListener()

{

public void actionPerformed(ActionEvent ae)

{

SaveObject();

}

}

);

return optionSave;

}

*********Save Object Class*************

import java.io.*;

public class SaveObject

{

public static void main(String[] args)

{

try

{

ObjectOutputStream objOut =

new ObjectOutputStream(new FileOutputStream("ObjectFile.dat"));

JPanel paintPanel = new JPanel(paintPanel);

objOut.saveObject(paintPanel);

objOut.close();

}

catch (IOException ioe){ioe.printStackTrace();}

}

}

[1238 byte] By [JavaMan9] at [2007-9-27 14:14:57]
# 1
You're way off. If you're in school, try to ask a computer teacher. If not, get a book and learn OO programming (OO means Object Oriented)
tjacobs01 at 2007-7-5 22:04:36 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
I realize that I may be way off, but that's the reason why I posted in the New to Java Technology Forum. I don't think it's that far off, but I may be wrong. I would like to here suggestions on how to fix it.
JavaMan9 at 2007-7-5 22:04:36 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 3
You need to read up onobject oriented programming. Your implementation is indeed way off, but do not let this deter you from learning Java.
kaze0 at 2007-7-5 22:04:36 > top of Java-index,Archived Forums,New To Java Technology Archive...