File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

gui question

 
mike proger
Greenhorn
Posts: 14
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nevermind, im slow but i get it
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic