Hi I am new to this so I am trying to brake it down into sections, I am learing java from a book right know and I have not programed much so I am having some issues with this. In the code below I want to take the text the user types into the text box and write it to a txt file. With two buttons one that will clear the txt field and one that will write the text file.
I understand how to do consul programs but cant get the hole user interface coding down could someone help please.
You've got three questions here: How to listen for a button press. Have a look at the Java Tutorial on How to Use Buttons. How to get text out of a text area. Just invoke the getText() method on it. And finally, how to write text to a file. Again, the Java Tutorial has a chapter on Input and Output. It doesn't tell you specifically how to write text to a file, but it should give you enough information to figure it out. If not, feel free to ask for another hint!