JPasswordField -> casting problem

Posted on 2004-11-26
Last Modified: 2012-05-05

I am trying to grab the content of the JpasswordField and display the content of it on the JtextField, and somewhere else

also, i need to cast the content of the JpasswordField out as a String, but i keep on getting an error msg if i cast it out directly.

can anyoen suggest me how to do it?
Question by:tom_mk
    LVL 16

    Expert Comment


    Can you put your current codes here so that we can analyze where there errors are.

    LVL 92

    Accepted Solution

    String password = new String(field.getPassword());

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    twoTwo  challenge 35 73
    abstract class with all non abstract mentods 6 58
    Receive file in Servlet 1 28
    sumDigits  challenge 7 40
    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
    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…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now