This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

gui question

 
mike proger
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok so if im writing a client server program in command line I know I can use a line like

String login = fromClient.readLine();

to send a line of text from client to server.

How might I send information say from a JTextField from the client to the server. I'm not sure where to start with that one
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if all you need is a login string, then

String login = textFieldMyLogin.getText();

will do the job.
 
mike proger
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
textFieldMyLogin represents the variable name asigned to the textField right?
 
mike proger
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nevermind, im slow but i get it
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic