Very simple get the text using JPasswordField#getPassword() which returns a char[] of the text, then simply get the length of the array and check if it is equal to 0:
JPasswordField jpf...
if(jpf.getPassword().length == 0) {
// it is empty
}else {
// it is not empty
}