applet小程序

来源:互联网 发布:十六进制颜色代码软件 编辑:程序博客网 时间:2024/06/05 20:20
//文本框组件示例import java.awt. *;class WindowText extends Frame{Label label1;TextField text1;WindowText(String s){super(s);setLayout(new FlowLayout());label1 = new Label("输入密码");text1 = new TextField(10);text1.setEchoChar('*');add(label1);add(text1);setBounds(100,100,300,100);setVisible(true);}}public class TextExample{public static void main(String[]args){WindowText win = new WindowText("添加了密码文本框的窗口");}}

0 0
原创粉丝点击