The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

using getText() and getPassword() methods

Posted by Corina on January 18, 2002 at 5:06 AM

This two methods capture the text in each component, define two variables String name, char[] pass, and then in your actionPerformed add this:

name = tfname.getText();
pass = tfpass.getPassword();

If you look in this direction you have examples:
http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us