有段代码不明白
import java.awt.*;import java.awt.event.*;
import javax.swing.*;
public class JPasswordFieldDemo extends JFrame
{
JTextField userName;
JPasswordField passWord;
JButton logonButton;
JButton cancelButton;
public JPasswordFieldDemo()
{
super("JPasswordField演示");
Container container=getContentPane();
container.setLayout(new GridLayout(3,2,2,2));
userName=new JTextField(16);
passWord=new JPasswordField(16);
logonButton=new JButton("登录");
logonButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
char[] pw=passWord.getPassword();
String message="您的用户名:"+userName.getText()+"\n你的密码:"+new String(pw);
JOptionPane.showMessageDialog(JPasswordFieldDemo.this, message);
}
});
cancelButton=new JButton("退出");
cancelButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
System.exit(0);
}
});
container.add(new JLabel(" 用户名:"));
container.add(userName);
container.add(new JLabel(" 密码:"));
container.add(passWord);
container.add(logonButton);
container.add(cancelButton);
setResizable(false);
setSize(300,120);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args)
{
new JPasswordFieldDemo();
}
}
中的JPasswordFieldDemo.this 指的是什么啊