title: How to serialize an object containing an Image?
body: <p>How i can sent object with <code>Image</code>? I am getting this error:</p>
  
  <pre><code>java.io.NotSerializableException: org.eclipse.swt.graphics.Image 
  </code></pre>
  
  <p>I can sent normal object, e. String, or whatever other objects.</p>
  
  <pre><code>     public void sentObject(Card GraczK) throws IOException 
       {
  
              outt.writeObject(GraczK);
              outt.flush();
              System.out.print(GraczK);
  
        }
  </code></pre>
  
  <p>CARD type </p>
  
  <pre><code>public class Card implements Serializable {
  private int Value, Colour;
  
  private Image img;
  
  public Card(int i, int j) {
      Colour = i;
      Value = j;
      img = new Image(null, MainWarSever.class.getResourceAsStream("/Karty/k" + Value + " (" + Colour + ").png"));
  }
  
  public int getValue() {
      return Value;
  }
  
  public int getColour() {
      return Colour;
  }
  
  public Image getImg() {
      return img;
  }
  </code></pre>
  
  <p>}</p>