Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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