T_ON_CLOSE);setVisible(true);setBounds(100,50,528,258);validate();}publicvoidactionPerformed(ActionEvente){if(e.getSource()==copyButton){puterProcess.copy();}if(e.getSource()==clearButton){puterProcess.setText(null);}if(e.getSource()==saveButton){JFileChooserchooser=newJFileChooser();intstate=chooser.showSaveDialog(null);Filefile=chooser.getSelectedFile();if(file!=null&&state==JFileChooser.APPROVE_OPTION){try{Stringcontent=puterProcess.getText();StringReaderread=newStringReader(content);BufferedReaderin=newBufferedReader(read);FileWriteroutOne=newFileWriter(file);BufferedWriterout=newBufferedWriter(outOne);Stringstr=null;while((str=in.readLine())!=null){out.write(str);out.newLine();}in.close();out.close();}catch(IOExceptione1){}}}}publicstaticvoidmain(Stringargs[]){newCalculatorWindow();}}