How to convert char [] to String ?
Hi
i created a login form ...
while entering username or password field may left blank program counts length a shows warnings....
But...textfield is ok...
But passsword field carrys char[]..
How can i convert it to string or is any other ideas possible...
String lengthtextfield = textfield.getText();//textfield is JTextFields object
char [] lengthpasswordfield = passwordfield.getPassword();//passwordfield is JPasswordFields object //password field
//fill username //its ok --works
if(lengthtextfield.length() == 0)
{
JOptionPane.showMessageDialog(null,"Enter username !!!","Username", JOptionPane.ERROR_MESSAGE);
return;
}
//fill password //but here comes problem
if(lengthpasswordfield.length() == 0)
{
JOptionPane.showMessageDialog(null,"Enter password !!!","Password", JOptionPane.ERROR_MESSAGE);
return;
}
Would anybody please tell me how can i solve this....

