reading data from textbox

i have a textbox with button, if i execute a button it has to start the backend console program and if i submit the some data through textbox that console programhas to read that data and save it.how will do this..help me plz..thx
[244 byte] By [jaggu321a] at [2007-11-26 20:42:41]
# 1

> i have a textbox with button, if i execute a button

> it has to start the backend console program and if i

> submit the some data through textbox that console

> programhas to read that data and save it.how will do

> this..help me plz..

>

> thx

textbox ? may be you mean JTextField or JTextArea

to set value to JTextField/JTextArea use 'setText' method

to get value from JTextField/JTextArea use 'getText' method

for details you can read API doc about JTextField and JTextArea

p_epia at 2007-7-10 2:02:29 > top of Java-index,Archived Forums,Socket Programming...
# 2

Add a JTextField and a JButton to a container, then have the container implement ActionListener. Then check the source or the actionCommand in method actionPerformed, and proceed accordingly. This is to let your console easily work with the text from the textfield, and there is no need for a socket at this point.

sztyopeka at 2007-7-10 2:02:29 > top of Java-index,Archived Forums,Socket Programming...
# 3
PrintStream, FileOutputStream, FileWriter should all help you to save it to a file.
kmangolda at 2007-7-10 2:02:29 > top of Java-index,Archived Forums,Socket Programming...