怎么用mina写个登录程序?

来源:百度知道 编辑:UC知道 时间:2024/07/04 10:12:10
怎么用mina写个登录程序?答好了加分最好有代码

mina不会啊

import java.awt.*;
import java.awt.event.*;
public class TestUser {
public static void main (String[] args) {
new User().launchFrame();
}
}

class User extends Frame {
TextField t1,t2;
public void launchFrame() {
t1 = new TextField (10);
t2 = new TextField (10);
t2.setEchoChar('*');
Button bu = new Button ("确认");
bu.addActionListener (new Monitor8());
Label l1 = new Label ("用户名");
Label l2 = new Label ("密码");
setLayout (new GridLayout (3,2));
add (l1);
add (t1);
add (l2);
add (t2);
add (bu);
addWindowListener (new WindowAdapter() {
public void windowClosing(WindowEvent e) {
setVisible (false);
System.exit(0);
}
} );
pack ();
setLocation (300,300);