Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Save a text field as a variable

 
James Palmer
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the API for JTextComponent here.
Specifically, getText().
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic