Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   how to add JPassword field to a JTable (http://www.go4expert.com/forums/add-jpassword-field-jtable-t2435/)

kavitha2007 4Jan2007 11:35

how to add JPassword field to a JTable
 
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.

pradeep 4Jan2007 14:13

Re: how to add JPassword field to a JTable
 
Example:
Code: Java

JPasswordField password = new JPasswordField();
        password.setBorder( new LineBorder(Color.BLACK) );
        TableCellEditor editor = new DefaultCellEditor( password );
        table.getColumnModel().getColumn(1).setCellEditor( editor );



All times are GMT +5.5. The time now is 23:58.