Hi yamada,
just create e.g. new JFrame in GUI Builder.
1. Place there jTextField with jButton.
2. Invoke context menu on jButton and choose Events -> Action
->actionPerformed (you will be automatically switched into source code)
3. write e.g. this code in handler
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String filename = "c:/test.txt";
FileWriter writer = null;
try {
try {
writer = new FileWriter(filename);
} catch (IOException ex) {
Logger.getLogger(NewJFrame4.class.getName()).log(Level.SEVERE, null, ex);
}
jTextField1.write(writer);
} catch (IOException exception) {
System.err.println("Save oops");
} finally {
if (writer != null) {
try {
writer.close();
} catch (IOException exception) {
System.err.println("Error closing writer");
exception.printStackTrace();
}
}
}
}
This should work.
Regards
Janie
yamada napsal(a):
> Can I have any example source programs that enable me to store in a file
> opened the data which are input in GUI TextField(s),
> for example.?
>
> yoshiaki yamada (NAPRA)
>
y-yamada@...
>
>