• 大小: 1.92MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-14
  • 语言: Java
  • 标签:

资源简介

java 聊天程序,拥有私聊,公聊,截图,传送文件等功能,同时拥有《总结与反思文档》,《聊天室需求说明书 》,《上机备忘录》,《设计说明书》和《项目计划书规范》。 希望对大家有用哦

资源截图

代码片段和文件信息

package chat;

/**
 * CaptureScreen.java
 */
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import javax.imageio.*;
import java.awt.image.*;

public class CaptureScreen extends Jframe implements ActionListener {
    private JButton startcancel;
    private JPanel c;
    private BufferedImage get;
    private JTabbedPane jtp;//一个放置很多份图片
    private int index;//一个一直会递增的索引用于标认图片
    private JRadioButton javasystem;//JAVA界面系统界面
    /** Creates a new instance of CaptureScreen */
    public CaptureScreen() {
        super(“屏幕截取“);
        try{
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }catch(Exception exe){
            exe.printStackTrace();
        }
        initWindow();
        initOther();
    }
    private void initOther(){
        jtp=new JTabbedPane(JTabbedPane.TOPJTabbedPane.SCROLL_TAB_LAYOUT);
    }
    private void initWindow(){
        start=new JButton(“开始截取“);
        cancel=new JButton(“退出“);
        start.addActionListener(this);
        cancel.addActionListener(this);
        JPanel buttonJP=new JPanel();
        c=new JPanel(new BorderLayout());
        JLabel jl=new JLabel(“屏幕截取“ JLabel.CENTER);
        JLabel jl1=new JLabel(“提示:双击选定区域进行保存等操作“JLabel.CENTER);
        jl.setFont(new Font(“黑体“Font.BOLD40));
        jl1.setFont(new Font(“宋体“Font.BOLD20));
        jl.setForeground(Color.RED);
        jl1.setForeground(Color.BLUE);
        c.add(jlBorderLayout.CENTER);
        c.add(jl1BorderLayout.SOUTH);
        buttonJP.add(start);
        buttonJP.add(cancel);
        buttonJP.setBorder(BorderFactory.createtitledBorder(“公共操作区“));
        JPanel jp=new JPanel();//放置两个单选按钮的面板
        jp.add(java=new JRadioButton(“java界面“));
        jp.add(system=new JRadioButton(“系统界面“true));
        java.addActionListener(this);
        system.addActionListener(this);
        jp.setBorder(BorderFactory.createtitledBorder(“界面风格“));
        ButtonGroup bg=new ButtonGroup();
        bg.add(java);
        bg.add(system);
        JPanel all=new JPanel();
        all.add(jp);
        all.add(buttonJP);
        this.getContentPane().add(cBorderLayout.CENTER);
        this.getContentPane().add(allBorderLayout.SOUTH);
        this.setSize(500400);
        this.setLocationRelativeTo(null);
        this.setVisible(true);
        this.setAlwaysOnTop(true);
        this.setDefaultCloseOperation(Jframe.DISPOSE_ON_CLOSE);
    }
    
    private void updates(){
        this.setVisible(true);
        if(get!=null){
            //如果索引是0则表示一张图片都没有被加入过
            //则要清除当前的东西重新把tabpane放进来
            if(index==0){
                c.removeAll();
                c.add(jtpBorderLayout.CENTER);
            }else{//否则的话直接对tabpane添加面板就可以了
                

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

     文件      31232  2009-07-14 09:35  java聊天程序-郁传仕-孙一泉-丁然\07281094 丁然-专题训练总结与反思.doc

     文件      32768  2009-07-14 09:38  java聊天程序-郁传仕-孙一泉-丁然\07281109孙一泉-专题训练总结与反思.doc

     文件      32768  2009-07-14 02:16  java聊天程序-郁传仕-孙一泉-丁然\07281113-郁传仕-专题训练总结与反思.doc

     文件        232  2009-07-12 14:02  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\.classpath

     文件        393  2009-07-12 14:02  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\.project

     文件       1393  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen$1.class

     文件        506  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen$2.class

     文件        938  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen$BMPfilter.class

     文件        938  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen$GIFfilter.class

     文件        938  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen$JPGfilter.class

     文件       2272  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen$PicPanel.class

     文件       1052  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen$PNGfilter.class

     文件       8289  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen$Temp.class

     文件       9332  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\CaptureScreen.class

     文件        651  2009-07-13 15:31  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\Chatframe$1.class

     文件       3837  2009-07-13 15:31  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\Chatframe$acceptfilethread.class

     文件       2922  2009-07-13 15:31  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\Chatframe$FontAttrib.class

     文件       4114  2009-07-13 15:31  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\Chatframe$sendfilethread.class

     文件      19391  2009-07-13 15:31  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\Chatframe.class

     文件        596  2009-07-12 14:08  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\Connect$1.class

     文件       7498  2009-07-12 14:08  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\Connect.class

     文件       2611  2009-07-12 14:08  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\MyTextArea.class

     文件       4023  2009-07-12 14:08  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\PList.class

     文件       1033  2009-07-12 14:08  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\PopupListener.class

     文件       1692  2009-07-13 10:38  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\chat\States.class

     文件       3315  2009-07-12 14:08  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\server\ChatServer.class

     文件       4157  2009-07-12 14:08  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\bin\server\ClientProc.class

     文件      39801  2009-07-13 09:02  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\src\chat\1.gif

     文件       1254  2009-04-16 21:18  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\src\chat\2.gif

     文件       8000  2008-11-22 00:37  java聊天程序-郁传仕-孙一泉-丁然\testmychatroom1.6\src\chat\ButtonSenddown.gif

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

评论

共有 条评论

相关资源