Note that JPasswordField#getPassword() returns char[], and so you could handle the password as it is given to you (assuming that you are using a JPasswordField): as an array of char. Either that or hash it somehow and pass the hash code.
Edit
You state:
Yes I am using a JPasswordField. However I used getText() for simplicity as it returns a String. Does the character array guarentee additional security than a string when being passed from one frame to another?
Don't use getText() for the very reason that you're asking your question: you shouldn't handle passwords as Strings at all as this increases the ease of their discovery. Look at the API for the JPasswordField class and you'll see that getText() has been deprecated for this very same reason. As a general rule you should not use deprecated methods.
Edit 2
You state:
Ok. Now I understand it. But how can a password be passed from one frame to another? Does passing a char[] guarantee security?
As far as I know, nothing guarantees security, but handling the password as a char array does improve security. Use a char[] constructor parameter or a setter method that takes a char[] parameter.