1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to add JPassword field to a JTable

Discussion in 'Java' started by kavitha2007, Jan 4, 2007.

  1. kavitha2007

    kavitha2007 New Member

    Joined:
    Jan 4, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    Example:
    Code:
    		JPasswordField password = new JPasswordField();
    		password.setBorder( new LineBorder(Color.BLACK) );
    		TableCellEditor editor = new DefaultCellEditor( password );
    		table.getColumnModel().getColumn(1).setCellEditor( editor );
    
     

Share This Page