Solved

getPassword() of JPasswordField

Posted on 1998-09-16
1
395 Views
Last Modified: 2012-08-13
I am still facing error in my program
It says getPassword() method not found in JPasswordField

This is part of my program code
I have imported
import java.awt.swing.JPasswordField;
In jdk1.2 beta 3 this is the syntax.

 JPasswordField input = (JPasswordField)e.getSource();
                char[] password = input.getPassword();
Can anybody give me solutions
0
Comment
Question by:geostp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
cph earned 10 total points
ID: 1224370
Are you sure that the classpath and all the other setting are properly set to the jdk1.2 beta3?
Try to replace getPassword() by getText(), if this one works it means that you enviroment varaible are not set to the jdk1.2.

CpH
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question