views:

39

answers:

2

Is it hard to do the following with the Java? First I need to generate a window with a text field (no buttons, nothing, just a text field). Than, when a user types a symbol in the text filed, program immediately stores information about this in a file (which symbol was typed and when). That's it.

+1  A: 

So you should read something about JFrame and JTextField and after (Add)ActionListeners (function in JTextField) in java and File Streams like FileInputStream and FileOutputStream. It's very easy !

oneat
+1  A: 

No, it's not hard. The following code snippet may get you running with the JTextField:

http://www.java2s.com/Code/Java/Swing-JFC/TextfieldsandJavaevents.htm

and this can help with writing to a file:

http://www.java2s.com/Code/Java/File-Input-Output/WritelinesoftexttofileusingaPrintWriter.htm

Geo