how to add JPassword field to a JTable

kavitha2007's Avatar, Join Date: Jan 2007
Newbie Member
How to add a Jpassword field in a JTable

My application requires the need for the creation of a new user.
So the new user window appears in a jtable ,having the columns as user name and password.so my doubt is how to add Jpassword field to the JTable.
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Example:
Code: Java
JPasswordField password = new JPasswordField();
        password.setBorder( new LineBorder(Color.BLACK) );
        TableCellEditor editor = new DefaultCellEditor( password );
        table.getColumnModel().getColumn(1).setCellEditor( editor );