javaä¸ç¨getText()è·åtextfieldå
容ï¼ç¶åå建ä¸ä¸ªsaveæ¹æ³ä¿åå
容å³å¯ã
saveæ¹æ³å
容å¦ä¸ï¼
void saveToFile(String fileName, JTextField textField) throws Exception {
FileOutputStream out = new FileOutputStream(fileName, true);
out.write(textField.getText().getBytes());
}
温馨提示:答案为网友推荐,仅供参考