Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serialization and Graphics

 
Kriti Garg
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is...
"why Graphics class do not implement serializable interface".
like Color or others in java.awt

Thanks
Kriti
 
Jason Kingsley
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
because a graphics context is usually quite unique to a machine/address space/device and serialising it over the wire makes absolutely no sense to the receiving context.

Basically, wanting to draw onto a remote graphics context is a very very bad idea. If you are wanting to say remotely control/cause to draw things between some client and server then you are better off looking at some form of protocol/messaging system between the two entities. This would abstract away the physical devices and provide adequate seperation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic