Hi, I am using JPasswordField in my program. I would like to use this password to access to my Informix Database. Some source code: ..... JPasswordField password = new JPasswordField(); ..... Connection c = DriverManager.getConnection(url, userName.getText(), password.getPassword()); ..... This gives me some the compile error because the return value of getPassword is char[], and the DriverManager is expecting a String. Anyone can help? Thanks! qionghua
Peter Tran
Bartender
Joined: Jan 02, 2001
Posts: 783
posted
0
Then you should create a String object from the char[] like this,