dcsimg
Store and retrive Canvas in file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dushyant_vyas
Posted On:   Wednesday, September 26, 2001 04:49 AM

I am drwing various shapes on canvas.
How do I store and retrive canvas in a file with AWT ??

Re: Store and retrive Canvas in file

Posted By:   Ian_Mechura  
Posted On:   Friday, September 28, 2001 03:07 PM

create a class that extends Canvas and
implements the serializable interface.
Then you create an ObjectOutputStream()
probably with a FileOutputStream()
inside of it. and then you just write
your Object through the stream into
the file of your choice. To reverse the
process you would use an
ObjectInputStream() and a
FileInputStream().

If this is not enough detail I can
write more.

Good Luck,
Ian
About | Sitemap | Contact