It's not a secret anymore!*
The moose likes Swing / AWT / SWT and the fly likes Save a text field as a variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Save a text field as a variable" Watch "Save a text field as a variable" New topic
Author

Save a text field as a variable

James Palmer
Ranch Hand

Joined: Mar 15, 2004
Posts: 36
Hello,basically am doing an assignment for university and there's one thing i don't seem to find a solution to.I have made a GUI and i want something that i have written as an input in a text field to be saved as a string.How can i do this?Replies are very appreciated.
Jeffrey Hunter
Ranch Hand

Joined: Apr 16, 2004
Posts: 305
Check out the API for JTextComponent here.
Specifically, getText().
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
wood burning stoves
 
subject: Save a text field as a variable
 
Similar Threads
Date Difference
How to make text field to accept only alphabets.
How to make text field to accept only alphabets
swng text field issues
how to make text field to accept only alphabets