package jwinnet;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import javax.swing.border.*;
import java.awt.event.*;
/**
* <p>Title: jWinNetTools</p>
* <p>Description: http://www.9812.net</p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: hacker</p>
* @author netkiller
* @version 1.0
*/
public class MessageFrame extends JFrame {
int nDestination;
JPanel contentPane;
XYLayout xYLayout1 = new XYLayout();
JTextField jTextFieldMessage = new JTextField();
JButton jButton1 = new JButton();
JLabel jLabel3 = new JLabel();
JLabel jLabel2 = new JLabel();
JTextField jTextFieldHost = new JTextField();
JLabel jLabel1 = new JLabel();
XYLayout xYLayout2 = new XYLayout();
JRadioButton jRadioButton1 = new JRadioButton();
JRadioButton jRadioButton2 = new JRadioButton();
JRadioButton jRadioButton3 = new JRadioButton();
ButtonGroup Destination = new ButtonGroup();
JButton jButton2 = new JButton();
JPanel jPanel1 = new JPanel();
TitledBorder titledBorder1;
XYLayout xYLayout3 = new XYLayout();
JComboBox jComboBoxNum = new JComboBox();
public MessageFrame() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
//setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
contentPane = (JPanel) this.getContentPane();
titledBorder1 = new TitledBorder("");
titledBorder1 = new TitledBorder("");
jLabel1.setText("主机:");
jLabel2.setText("消息:");
jLabel3.setText("次数:");
jLabel3.setToolTipText("");
jButton1.setMaximumSize(new Dimension(59, 30));
jButton1.setMinimumSize(new Dimension(59, 30));
jButton1.setPreferredSize(new Dimension(50, 25));
jButton1.setText("发送");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jButton1_actionPerformed(e);
}
});
contentPane.setLayout(xYLayout2);
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
this.setResizable(false);
this.setSize(new Dimension(400, 270));
this.setTitle("http://www.9812.net");
jLabel1.setText("主机名/IP:");
jLabel2.setText("消息:");
jRadioButton1.setBorder(null);
jRadioButton1.setSelected(true);
jRadioButton1.setText("主机");
jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jRadioButton1_actionPerformed(e);
}
});
jRadioButton2.setText("所有用户");
jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jRadioButton2_actionPerformed(e);
}
});
jRadioButton3.setText("指定域");
jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jRadioButton3_actionPerformed(e);
}
});
jButton2.setMaximumSize(new Dimension(59, 30));
jButton2.setMinimumSize(new Dimension(59, 30));
jButton2.setPreferredSize(new Dimension(50, 25));
jButton2.setText("取消");
jButton2.addActionListener(new ActionListener(this));
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jButton2_actionPerformed(e);
}
});
jPanel1.setLayout(xYLayout3);
titledBorder1.setTitle("目的选项:");
contentPane.setBackground(UIManager.getColor("ColorChooser.swatchesDefaultRecentColor"));
jTextFieldMessage.setBorder(BorderFactory.createLineBorder(Color.black));
jTextFieldHost.setBorder(BorderFactory.createLineBorder(Color.black));
jComboBoxNum.setFont(new java.awt.Font("Dialog", 0, 12));
jComboBoxNum.setEditable(true);
jPanel1.setBorder(titledBorder1);
contentPane.add(jPanel1, new XYConstraints(22, 9, 358, 101));
jPanel1.add(jRadioButton2, new XYConstraints(125, 0, -1, -1));
jPanel1.add(jRadioButton3, new XYConstraints(236, 0, 64, -1));
jPanel1.add(jRadioButton1, new XYConstraints(25, 6, 53, 16));
jPanel1.add(jTextFieldHost, new XYConstraints(128, 41, 203, -1));
jPanel1.add(jLabel1, new XYConstraints(27, 43, -1, -1));
contentPane.add(jTextFieldMessage, new XYConstraints(96, 122, 284, -1));
contentPane.add(jLabel3, new XYConstraints(26, 158, -1, -1));
contentPane.add(jComboBoxNum, new XYConstraints(96, 155, -1, 21));
contentPane.add(jLabel2, new XYConstraints(26, 124, -1, -1));
contentPane.add(jButton2, new XYConstraints(208, 194, 81, -1));
contentPane.add(jButton1, new XYConstraints(95, 193, 80, -1));
Destination.add(jRadioButton1);
Destination.add(jRadioButton2);
Destination.add(jRadioButton3);
for(int i=1;i<100;i++){
jComboBoxNum.addItem(i+"");
}
}
void jRadioButton1_actionPerformed(ActionEvent e) {
jLabel1.setText("主机名/IP:");
jTextFieldHost.setText(" . . . ");
jTextFieldHost.enable();
nDestination = 0;
}
void jRadioButton2_actionPerformed(ActionEvent e) {
jLabel1.setText("所有用户:");
jTextFieldHost.setText("*");
jTextFieldHost.disable();
nDestination = 1;
}
void jRadioButton3_actionPerformed(ActionEvent e) {
jLabel1.setText("其他域用户:");
jTextFieldHost.setText("WorkGroup");
jTextFieldHost.enable();
nDestination = 2;
}
void jButton2_actionPerformed(ActionEvent e) {
// this.hide();
System.exit(0);
}
void jTextFieldHost_mouseClicked(MouseEvent e) {
if(jTextFieldHost.isEnabled()){
jTextFieldHost.setText("");
}
}
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
//System.exit(0);
this.hide();
}
}
void jButton1_actionPerformed(ActionEvent e) {
String host = jTextFieldHost.getText();
String message = jTextFieldMessage.getText();
Integer n = new Integer((String)jComboBoxNum.getSelectedItem());
// Integer n = new Integer(jTextFieldNum.getText());
WinNet winnt = new WinNet();
int Num = n.intValue();
for(int i=0;i<Num;i++)
switch(nDestination){
case 0:
case 1:
winnt.NetSend(host,message);
break;
case 2:
host += "/domain:"+jTextFieldHost.getText();
winnt.NetSend(host,message);
break;
}
}
}
class MessageFrame_jRadioButton1_actionAdapter implements java.awt.event.ActionListener {
MessageFrame adaptee;
MessageFrame_jRadioButton1_actionAdapter(MessageFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jRadioButton1_actionPerformed(e);
}
}
class MessageFrame_jRadioButton2_actionAdapter implements java.awt.event.ActionListener {
MessageFrame adaptee;
MessageFrame_jRadioButton2_actionAdapter(MessageFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jRadioButton2_actionPerformed(e);
}
}
class MessageFrame_jRadioButton3_actionAdapter implements java.awt.event.ActionListener {
Message
没有合适的资源?快使用搜索试试~ 我知道了~
Windows信使工具
共150个文件
class:44个
html:36个
java~1~:10个
需积分: 50 7 下载量 101 浏览量
2006-03-16
00:00:00
上传
评论
收藏 6.71MB RAR 举报
温馨提示
Windows Message Tool(Windows 信使) OpenSource Software
资源推荐
资源详情
资源评论
收起资源包目录
Windows信使工具 (150个子文件)
MainFrame.class 7KB
MainFrame.class 7KB
MessageFrame.class 7KB
MessageFrame.class 7KB
WinNet.class 3KB
WinNet.class 3KB
Application.class 748B
Application.class 748B
MessageFrame_jRadioButton1_actionAdapter.class 708B
MessageFrame_jRadioButton2_actionAdapter.class 708B
MessageFrame_jRadioButton3_actionAdapter.class 708B
MessageFrame_jRadioButton1_actionAdapter.class 708B
MessageFrame_jRadioButton2_actionAdapter.class 708B
MessageFrame_jRadioButton3_actionAdapter.class 708B
MessageFrame$3.class 696B
MessageFrame$4.class 696B
MessageFrame$2.class 696B
MessageFrame$3.class 696B
MessageFrame$4.class 696B
MessageFrame$2.class 696B
MessageFrame_jButton2_actionAdapter.class 693B
MessageFrame_jButton2_actionAdapter.class 693B
MessageFrame$5.class 691B
MessageFrame$1.class 691B
MessageFrame$5.class 691B
MessageFrame$1.class 691B
MainFrame_jRadioButton2_actionAdapter.class 690B
MainFrame_jRadioButton1_actionAdapter.class 690B
MainFrame_jRadioButton3_actionAdapter.class 690B
MainFrame_jRadioButton2_actionAdapter.class 690B
MainFrame_jRadioButton1_actionAdapter.class 690B
MainFrame_jRadioButton3_actionAdapter.class 690B
MessageFrame_jTextFieldHost_mouseAdapter.class 675B
MainFrame_jButton2_actionAdapter.class 675B
MessageFrame_jTextFieldHost_mouseAdapter.class 675B
MainFrame_jButton2_actionAdapter.class 675B
MainFrame_jTextFieldHost_mouseAdapter.class 657B
MainFrame_jTextFieldHost_mouseAdapter.class 657B
ActionListener.class 651B
ActionListener.class 651B
MainFrame_jButton1_mouseAdapter.class 639B
MainFrame_jButton1_mouseAdapter.class 639B
MessageFrame_jButton1_mouseAdapter.class 436B
MessageFrame_jButton1_mouseAdapter.class 436B
stylesheet.css 1KB
jwinnet.dep2 16KB
untitled1.dep2 725B
UnnamedPackage.dep2 676B
jWinnetW.exe 1.33MB
net.exe 39KB
net.exe 39KB
MainFrame.html 29KB
MainFrame_jButton1_actionAdapter.html 10KB
MainFrame_jRadioButton1_actionAdapter.html 9KB
Application.html 9KB
WinNet.html 8KB
help-doc.html 7KB
index-3.html 6KB
serialized-form.html 6KB
MainFrame.html 6KB
index-4.html 5KB
index-1.html 5KB
package-tree.html 5KB
package-summary.html 5KB
overview-tree.html 5KB
index-6.html 5KB
index-7.html 5KB
index-8.html 5KB
package-use.html 4KB
index-5.html 4KB
index-2.html 4KB
MainFrame_jRadioButton1_actionAdapter.html 4KB
MainFrame_jButton1_actionAdapter.html 4KB
Application.html 4KB
WinNet.html 4KB
deprecated-list.html 4KB
jwinnet.html 1KB
package-frame.html 979B
allclasses-frame.html 890B
jWinnet.html 888B
untitled.html 852B
jwinnet.html 837B
index.html 700B
packages.html 678B
.html 674B
Frame1.html 611B
Untitled1.html 602B
untitled1.html~ 0B
jWinnet.html~ 0B
jWinnet.html~1~ 888B
untitled1.html~1~ 852B
jWinnet.jar 1.27MB
jWinnet2.jar 1.2MB
jWinnet.jar 1.2MB
jbcl.jar 800KB
dx.jar 328KB
beandt.jar 145KB
MessageFrame.java 9KB
MainFrame.java 8KB
WinNet.java 4KB
共 150 条
- 1
- 2
资源评论
9812
- 粉丝: 1
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功