Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trouble using the TextField.GetText() method

1 view
Skip to first unread message

Bhargav

unread,
Sep 19, 2010, 3:38:02 PM9/19/10
to
Hi,

I am a novice to Java Programming and I was trying some coding using
the method jTextField.getText( ).
I am encoutering a strange error.

Problem Description:

My code is supposed to accept the 'Password' from a "Text Box" and
send the password to a server for authentication purposes.
If I hard-code the 'Password', the authentication succeeds. However,
if I obtain the same password from the text box using getText()
method, the authentication fails.

The code is as follows:

Working code:

String password = "Password";
ISVNAuthenticationManager authManager =
SVNWCUtil.createDefaultAuthenticationManager(password);


Non Working code:

String password = jTextField.getText(); // I enter Password in the
Text box
ISVNAuthenticationManager authManager =
SVNWCUtil.createDefaultAuthenticationManager(password);

What could potentially be the problem here?

Thanks in Advance,
Treadstone

0 new messages