private void writeObject(java.io.ObjectOutputStream s) throws IOException {
  TextComponentPeer peer=(TextComponentPeer)this.peer;
  if (peer != null) {
    text=peer.getText();
    selectionStart=peer.getSelectionStart();
    selectionEnd=peer.getSelectionEnd();
  }
  s.defaultWriteObject();
  AWTEventMulticaster.save(s,textListenerK,textListener);
  s.writeObject(null);
}

private void writeObject ( java . io . ObjectOutputStream s ) throws IOException { TextComponentPeer peer = ( TextComponentPeer ) this . peer ; if ( peer != null ) { text = peer . getText ( ) ; selectionStart = peer . getSelectionStart ( ) ; selectionEnd = peer . getSelectionEnd ( ) ; } s . defaultWriteObject ( ) ; AWTEventMulticaster . save ( s , textListenerK , textListener ) ; s . writeObject ( null ) ; }
writes default serializable fields to stream . writes a list of serializable textlistener ( s ) as optional data . the non - serializable textlistener ( s ) are detected and no attempt is made to serialize them .
