Hi Arun Kumar,
Add this below method to your Editor class
public Object getCellEditorValue()
{
String label = new String(password.getPassword());
System.out.println("Password is: "+label);
return label;
} I am sending some code for further help:
1) Add this line to paswordfiled column
table.getColumnModel().getColumn(0).setCellEditor(new PasswordEditor(new JCheckBox()));
2) Use this editor class
class PasswordEditor extends javax.swing.DefaultCellEditor {
protected JPasswordField password;
public PasswordEditor(JCheckBox checkBox) {
super(checkBox);
password = new JPasswordField();
password.setOpaque(true);
}
public java.awt.Component getTableCellEditorComponent(JTable table, Object value,boolean isSelected, int row, int column)
{
String label = (value ==null) ? "" : value.toString();
password.setText( label );
return password;
}
public Object getCellEditorValue()
{
String label = new String(password.getPassword());
System.out.println("Password is: "+label);
return label;
}
}
All The Best.