/*
* SendUI.java
*
* Created on __DATE__, __TIME__
*/
package com.xhb.smsg.ui;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.Socket;
import java.net.SocketException;
import java.util.Vector;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import com.xhb.smsg.ClientInfo;
import com.xhb.smsg.FileInfo;
import com.xhb.smsg.FileReceive;
import com.xhb.smsg.FileSend;
import com.xhb.smsg.HandleEvent;
import com.xhb.smsg.JDragList;
import com.xhb.smsg.PResource;
import com.xhb.smsg.ScreenSend;
/**
*
* @author xhb
* @date 2010-5-11 21:24:45
*/
@SuppressWarnings("serial")
public class SendUI extends javax.swing.JFrame {
private ClientInfo clientInfo;
public Vector<String> receiveFiles = new Vector<String>();
private File receiveDir;
private ScreenSend screenSendThread;
public static ScreenUI screenUI = null;
private HandleEvent eventThread;
/** Creates new form SendUI */
public SendUI() {
setIconImage(new ImageIcon(getClass().getResource("icon.png")).getImage());
initComponents();
onLoad();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
// GEN-BEGIN:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
txtSend = new javax.swing.JEditorPane();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jScrollPane2 = new javax.swing.JScrollPane();
txtReceive = new javax.swing.JEditorPane();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
lblHostName = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
lblIP = new javax.swing.JLabel();
jToolBar1 = new javax.swing.JToolBar();
btnSp = new javax.swing.JButton();
btnSendFile = new javax.swing.JButton();
btnCtrol = new javax.swing.JButton();
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel3 = new javax.swing.JPanel();
jScrollPane3 = new javax.swing.JScrollPane();
listSend = new JDragList();
jTabbedPane2 = new javax.swing.JTabbedPane();
jPanel4 = new javax.swing.JPanel();
jScrollPane4 = new javax.swing.JScrollPane();
listReceive = new javax.swing.JList();
jLabel3 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setResizable(false);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
formWindowClosing(evt);
}
});
jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
txtSend.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 0, 102)));
jScrollPane1.setViewportView(txtSend);
jButton1.setText("\u53d1\u9001");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("\u5173\u95ed");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
txtReceive.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 0, 102)));
txtReceive.setEditable(false);
jScrollPane2.setViewportView(txtReceive);
jPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(255, 204, 0)));
jLabel1.setText("\u4e3b\u673a\u540d\uff1a");
jLabel2.setText("IP\u5730\u5740\uff1a");
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(
jPanel1Layout.createSequentialGroup().addContainerGap().add(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabel1).add(jLabel2)).addPreferredGap(
org.jdesktop.layout.LayoutStyle.RELATED).add(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING).add(lblIP,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE).add(
org.jdesktop.layout.GroupLayout.LEADING, lblHostName,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE))));
jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
jPanel1Layout.createSequentialGroup().addContainerGap().add(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(jLabel1).add(
lblHostName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)).add(18, 18, 18).add(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(lblIP,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(jLabel2)).addContainerGap(
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
jToolBar1.setFloatable(false);
jToolBar1.setRollover(true);
btnSp.setText("\u53d1\u9001\u95ea\u5c4f");
btnSp.setFocusable(false);
btnSp.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnSp.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnSp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnSpActionPerformed(evt);
}
});
jToolBar1.add(btnSp);
btnSendFile.setText("\u53d1\u9001\u6587\u4ef6");
btnSendFile.setFocusable(false);
btnSendFile.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnSendFile.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnSendFile.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnSendFileActionPerformed(evt);
}
});
jToolBar1.add(btnSendFile);
btnCtrol.setText("\u7533\u8bf7\u63a7\u5236");
btnCtrol.setFocusable(false);
btnCtrol.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnCtrol.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnCtrol.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCtrolActionPerformed(evt);
}
});
jToolBar1.add(btnCtrol);
jTabbedPane1.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
jScrollPane3.setViewportView(listSend);
org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE));
jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE));
jTabbedPane1.addTab("\u53d1\u9001\u6587\u4ef6", jPanel
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
smsg.tar.gz (73个子文件)
smsg
src
com
xhb
smsg
FileReceive.java 1KB
FileSend.java 2KB
HandleEvent.java 3KB
resource.properties 2KB
JScreenPanel.java 2KB
FileInfo.java 593B
ClientInfo.java 794B
ui
ScreenUI.java 3KB
online.png 1002B
friends.png 1KB
MainUI.java 17KB
ScreenUI.form 3KB
AboutUI.java 4KB
MainUI.form 4KB
SendUI.java 25KB
icon.png 47KB
SendUI.form 18KB
AboutUI.form 4KB
ScreenReceive.java 1KB
JDragList.java 3KB
ScreenSend.java 2KB
PResource.java 708B
bin
com
xhb
smsg
PResource.class 2KB
ClientInfo.class 1KB
ScreenSend.class 3KB
resource.properties 2KB
ScreenReceive.class 2KB
JDragList$2.class 1019B
ui
online.png 1002B
MainUI$6.class 1KB
MainUI$8.class 1KB
friends.png 1KB
ScreenUI.form 3KB
SendUI$2.class 765B
SendUI$3.class 765B
SendUI$1.class 738B
MainUI$5.class 546B
MainUI.class 15KB
SendUI$4.class 765B
MainUI$3.class 765B
ScreenUI$1.class 752B
MainUI$7.class 4KB
SendUI$5.class 765B
ScreenUI.class 4KB
AboutUI$2$1.class 712B
SendUI$7.class 546B
MainUI$4.class 765B
AboutUI$2.class 835B
MainUI$2.class 733B
MainUI.form 4KB
SendUI$6.class 765B
SendUI.class 19KB
MainUI$1.class 738B
icon.png 47KB
AboutUI.class 4KB
SendUI.form 18KB
AboutUI.form 4KB
AboutUI$1.class 740B
JDragList$1.class 967B
FileSend.class 3KB
FileReceive.class 3KB
JScreenPanel.class 4KB
FileInfo.class 1KB
JDragList.class 5KB
HandleEvent.class 3KB
smsg.png 351KB
.classpath 358B
.settings
org.eclipse.core.resources.prefs 88B
smsg.sh 95B
.project 380B
smsg.jar 167KB
lib
swing-layout-1.0.3.jar 115KB
AbsoluteLayout.jar 3KB
共 73 条
- 1
NONE9
- 粉丝: 7
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- vlmcsd-1113-2020-03-28-Hotbird64(最新版本KMS)
- 433.基于SpringBoot的冷链物流系统(含报告).zip
- com.harmonyos4.exception.PowerFailureException(怎么解决).md
- 使用 Python 字典统计字符串中每个字符的出现次数.docx
- com.harmonyos4.exception.SystemBootFailureException(怎么解决).md
- 球队获胜数据集.zip
- ERR-NULL-POINTER(解决方案).md
- <项目代码>YOLOv8 航拍行人识别<目标检测>
- 计算机网络-socket-inet-master.zip
- Java编程学习路线:从基础到实战全攻略
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页