📄 jform2.java
字号:
/* 2004年毕业设计
聊天室客户端界面类程序 jform2.java
设计人:王楠
*/
import java.awt.*;
import java.awt.event.*;
class jform2 extends Frame
{
static String sj_ip;
static int sj_port;
TextArea rtext1=new TextArea("",20,86,TextArea.SCROLLBARS_VERTICAL_ONLY);
TextArea rtext2=new TextArea("",4,85,TextArea.SCROLLBARS_VERTICAL_ONLY);
List list1=new List();
TextField text1=new TextField("所有人");
Button button1=new Button("发送");
Label label1=new Label("至:");
Label label2=new Label("聊天室共有0人");
Label label3=new Label("-悄悄话");
Checkbox checkbox1=new Checkbox();
//窗口画图
public void load()
{
this.setLayout(null);
this.setTitle("Kerberos's Chat system");
this.setSize(632,460);
this.setBackground(new Color(214,211,206));
this.setLocation(10,10);
this.setResizable(false);
this.add(rtext1);
this.add(rtext2);
this.add(list1);
this.add(text1);
this.add(button1);
this.add(label1);
this.add(label2);
this.add(label3);
this.add(checkbox1);
rtext1.setBounds(10,30,490,350);
rtext2.setBounds(10,390,490,60);
label2.setBounds(510,28,115,20);
list1.setBounds(510,45,110,320);
label1.setBounds(510,370,20,20);
text1.setBounds(530,370,85,20);
checkbox1.setBounds(530,392,20,20);
label3.setBounds(548,394,80,20);
button1.setBounds(510,415,110,35);
list1.add("所有人");
rtext1.setEditable(false);
rtext1.setBackground(Color.white);
text1.setEditable(false);
text1.setBackground(Color.white);
this.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -