• 大小: 20KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-17
  • 语言: Java
  • 标签: jsp  

资源简介

java+jsp源代码聊天室网站,可以用eclips打开

资源截图

代码片段和文件信息

package org.jetic.web.chat;

import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import javax.swing.border.*;
import java.io.*;
import java.net.*;

public class Chatapplet extends Japplet {
    boolean isStandalone = false;
    BorderLayout borderLayout1 = new BorderLayout();
    Border border1;
    JPanel jPanel2 = new JPanel();
    Border border2;
    BorderLayout borderLayout2 = new BorderLayout();
    JPanel jPanel1 = new JPanel();
    JButton buttonSend = new JButton();
    BorderLayout borderLayout3 = new BorderLayout();
    JPanel jPanel3 = new JPanel();
    Border border3;
    BorderLayout borderLayout4 = new BorderLayout();
    JTextField textTalk = new JTextField();
    JPanel jPanel4 = new JPanel();
    Border border4;
    BorderLayout borderLayout5 = new BorderLayout();
    JScrollPane jScrollPane1 = new JScrollPane();
    JTextArea textMessages = new JTextArea();

    PrintWriter out = null;

    /**Get a parameter value*/
    public String getParameter(String key String def) {
        return isStandalone ? System.getProperty(key def) :
            (getParameter(key) != null ? getParameter(key) : def);
    }

    /**Construct the applet*/
    public Chatapplet() {
    }
    /**Initialize the applet*/
    public void init() {
        try {
            jbInit();

            Client client = new Client(this);
            if (client.isConnected())
                out = client.getOutputStream();
            else
                appendMessage(“大大的错误!!“);
        }
        catch(Exception e) {
            e.printStackTrace();
        }
    }
    /**Component initialization*/
    private void jbInit() throws Exception {
        border1 = BorderFactory.createEmptyBorder(9999);
        border2 = BorderFactory.createEmptyBorder(9999);
        border3 = BorderFactory.createEmptyBorder(2025);
        border4 = BorderFactory.createEmptyBorder(0050);
        this.setSize(new Dimension(400300));
        this.getContentPane().setLayout(borderLayout1);
        jPanel2.setBorder(border2);
        jPanel2.setLayout(borderLayout2);
        buttonSend.setFocusPainted(false);
        buttonSend.setText(“发  送“);
        buttonSend.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                buttonSend_actionPerformed(e);
            }
        });
        jPanel1.setLayout(borderLayout3);
        jPanel3.setBorder(border3);
        jPanel3.setLayout(borderLayout4);
        jPanel4.setBorder(border4);
        jPanel4.setLayout(borderLayout5);
        textTalk.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(KeyEvent e) {
                textTalk_keyPressed(e);
            }
        });
        this.getContentPane().add(jPanel2 BorderLayout.CENTER);
        jPanel2.add(jPanel1 BorderLayout.SOUTH);
        jPanel1.add(buttonSend BorderLayout.EAST);
        jPanel1.add(jPane

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     目录          0  2003-04-14 19:11  JAVA+JSP程序系统的JSP聊天室

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\classes

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\classes\org

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat

     文件        736  2000-11-28 20:06  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\Chatapplet$1.class

     文件        690  2000-11-28 20:06  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\Chatapplet$2.class

     文件       5933  2000-11-28 20:06  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\Chatapplet.class

     文件       1892  2000-12-06 18:22  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\ChatServlet.class

     文件       1676  2000-11-28 20:07  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\Client.class

     文件       1677  2000-11-22 17:35  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\ClientRecieveThread.class

     文件        740  2000-11-22 13:46  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\Protocol.class

     文件       3043  2000-11-28 20:07  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\Server.class

     文件       2308  2000-11-22 14:00  JAVA+JSP程序系统的JSP聊天室\classes\org\jetic\web\chat\ServerThread.class

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\src

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\src\org

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\src\org\jetic

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web

    ..AD...         0  2001-01-20 12:11  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat

     文件       4955  2000-11-28 20:06  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat\Chatapplet.java

     文件       1153  2000-11-22 13:40  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat\ChatServlet.java

     文件        976  2000-11-28 20:06  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat\Client.java

     文件       1197  2000-11-22 17:34  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat\ClientRecieveThread.java

     文件        278  2000-12-06 18:28  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat\jeticchat.jsp

     文件        414  2000-11-22 13:37  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat\Protocol.java

     文件       1871  2000-11-22 13:58  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat\Server.java

     文件       1641  2000-11-22 14:00  JAVA+JSP程序系统的JSP聊天室\src\org\jetic\web\chat\ServerThread.java

     文件        120  2003-04-14 12:36  JAVA+JSP程序系统的JSP聊天室\源码之家.url

     文件       1944  2003-04-13 12:05  JAVA+JSP程序系统的JSP聊天室\mycodes.net说明.txt

............此处省略3个文件信息

评论

共有 条评论