Here is a small sample program I made for you, it
shows how to choose whatever character you want for
you password.
import javax.swing.*;
public class Form extends JFrame
{
JTextField userName = new JTextField(15);
JPasswordField password = new JPasswordField(15);
JTextArea comments = new JTextArea(4, 15);
public Form()
{
super("Feedback Form");
setSize(260,160);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel pane = new JPanel();
JLabel userNameLabel = new JLabel("Username: ",
SwingConstants.LEFT);
JLabel passwordLabel = new JLabel("Password: ",
SwingConstants.LEFT);
JLabel commentsLabel = new JLabel("Comments: ",
SwingConstants.LEFT);
password.setEchoChar('@');
comments.setLineWrap(true);
comments.setWrapStyleWord(true);
pane.add(userNameLabel);
pane.add(userName);
pane.add(passwordLabel);
pane.add(password);
pane.add(commentsLabel);
pane.add(comments);
setContentPane(pane);
//pack();
setVisible(true);
}
public static void main(String[] args)
{
Form frm = new Form();
}
}