This content has been marked as final. Show 3 replies
i have a textbox with button, if i execute a buttontextbox ? may be you mean JTextField or JTextArea
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..
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
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.
PrintStream, FileOutputStream, FileWriter should all help you to save it to a file.