private void cmd_export(){
  JFileChooser jc=new JFileChooser();
  jc.setDialogTitle(Msg.getMsg(Env.getCtx(),"Export"));
  jc.setDialogType(JFileChooser.SAVE_DIALOG);
  jc.setFileSelectionMode(JFileChooser.FILES_ONLY);
  if (jc.showSaveDialog(this) != JFileChooser.APPROVE_OPTION)   return;
  try {
    EditorKit kit=editorPane.getEditorKit();
    OutputStreamWriter writer=new OutputStreamWriter(new FileOutputStream(jc.getSelectedFile()));
    editorPane.write(writer);
    writer.flush();
    writer.close();
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,"HTMLEditor.export" + e.getMessage());
  }
}

private void cmd_export ( ) { JFileChooser jc = new JFileChooser ( ) ; jc . setDialogTitle ( Msg . getMsg ( Env . getCtx ( ) , "Export" ) ) ; jc . setDialogType ( JFileChooser . SAVE_DIALOG ) ; jc . setFileSelectionMode ( JFileChooser . FILES_ONLY ) ; if ( jc . showSaveDialog ( this ) != JFileChooser . APPROVE_OPTION ) return ; try { EditorKit kit = editorPane . getEditorKit ( ) ; OutputStreamWriter writer = new OutputStreamWriter ( new FileOutputStream ( jc . getSelectedFile ( ) ) ) ; editorPane . write ( writer ) ; writer . flush ( ) ; writer . close ( ) ; } catch ( Exception e ) { log . log ( Level . SEVERE , "HTMLEditor.export" + e . getMessage ( ) ) ; } }
export text to file
