private void save(){
  String fname=getSaveFileName();
  Writer fo;
  try {
    fo=new OutputStreamWriter(new FileOutputStream(fname),"UTF-8");
    try {
      textPane.write(fo);
    }
  finally {
      fo.close();
    }
    addLine("","Chat log has been saved to " + fname,NotificationType.CLIENT);
  }
 catch (  final IOException ex) {
    logger.error(ex,ex);
  }
}

private void save ( ) { String fname = getSaveFileName ( ) ; Writer fo ; try { fo = new OutputStreamWriter ( new FileOutputStream ( fname ) , "UTF-8" ) ; try { textPane . write ( fo ) ; } finally { fo . close ( ) ; } addLine ( "" , "Chat log has been saved to " + fname , NotificationType . CLIENT ) ; } catch ( final IOException ex ) { logger . error ( ex , ex ) ; } }
save the contents into the log file and inform the user about it .
