⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chatroom.java

📁 200多个自己编的java程序,大家可以学一下.
💻 JAVA
字号:
/* * ChatRoom.java * * Created on 2004年9月22日, 下午8:09 *//** * * @author  litertiger */import java.io.*;import java.net.*;import java.awt.*;import java.awt.event.*;public class ChatRoom extends java.applet.Applet implements ActionListener{        /** Initialization method that will be called after the applet is loaded     *  into the browser.     */    Button b;    TextField t1;    TextArea t2;    Socket socket;    DataOutputStream out=null;    DataInputStream in=null;    Thread thread;                public void init() {        setBackground(new Color(113,163,139));        setLayout(new BorderLayout());        b=new Button("send");        t1=new TextField(12);        t2=new TextArea();        Panel p=new Panel();        p.add(t1);        p.add(b);        add("Center",t2);        add("South",p);        b.addActionListener(this);        // TODO start asynchronous download of heavy resources    }        public void actionPerformed(ActionEvent e) {    }        public void start()    {        try{                    }    }            // TODO overwrite start(), stop() and destroy() methods}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -