• PUDN用户
    了解作者
  • Java
    开发工具
  • 19KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 32
    下载次数
  • 2011-05-08 10:43
    上传日期
基于java实现奇偶校验的示例软件,使用Java Swing界面编程,可视化界面软件,包含实现源码
OECheck.rar
  • src
  • oecheck
  • OECheckApp.java
    43.2KB
  • OECheckApp.form
    29KB
  • OECheck.jar
    39KB
内容介绍
/* * OECheckApp.java * * Created on 2010年10月17日, 下午6:39 */ package oecheck; import javax.swing.DefaultListModel; import javax.swing.JOptionPane; /** * * @author Newlife */ public class OECheckApp extends javax.swing.JFrame { /** Creates new form OECheckApp */ public OECheckApp() { initComponents(); b2.setToolTipText("钩上b2将模拟对信道中传输的字节信息第二位产生干扰,使该位变为1"); b3.setToolTipText("钩上b3将模拟对信道中传输的字节信息第三位产生干扰,使该位变为1"); b4.setToolTipText("钩上b4将模拟对信道中传输的字节信息第四位产生干扰,使该位变为1"); b5.setToolTipText("钩上b5将模拟对信道中传输的字节信息第五位产生干扰,使该位变为1"); b6.setToolTipText("钩上b6将模拟对信道中传输的字节信息第六位产生干扰,使该位变为1"); b7.setToolTipText("钩上b7将模拟对信道中传输的字节信息第七位产生干扰,使该位变为1"); b8.setToolTipText("钩上b8将模拟对信道中传输的字节信息第八位产生干扰,使该位变为1"); this.sendInfo = ""; oCheck = true; codeStr = ""; codeStrNet = ""; sendInfoBy16 = ""; recvInfo = ""; recvInfoS = ""; dlm = new DefaultListModel(); jListRecvDataStatus.setModel(dlm); senderComplete = false; channelComplete = false; receiverComplete = false; recvDataLog = null; jLabelSendDis.setText("传输信息的编码表示"); } /** 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. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jLabel1 = new javax.swing.JLabel(); jTextFieldInfo = new javax.swing.JTextField(); jLabelSendDis = new javax.swing.JLabel(); jRadioButtonOdd = new javax.swing.JRadioButton(); jRadioButtonEven = new javax.swing.JRadioButton(); jLabel3 = new javax.swing.JLabel(); jButtonSend = new javax.swing.JButton(); jLabelDisCode = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); jLabel4 = new javax.swing.JLabel(); jLabelNetB = new javax.swing.JLabel(); b1 = new javax.swing.JCheckBox(); b2 = new javax.swing.JCheckBox(); b3 = new javax.swing.JCheckBox(); b4 = new javax.swing.JCheckBox(); b5 = new javax.swing.JCheckBox(); b6 = new javax.swing.JCheckBox(); b7 = new javax.swing.JCheckBox(); b8 = new javax.swing.JCheckBox(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jLabelNetS = new javax.swing.JLabel(); jSeparator2 = new javax.swing.JSeparator(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabelNetB1 = new javax.swing.JLabel(); jLabelRecvDataDis = new javax.swing.JLabel(); jButton2 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); jListRecvDataStatus = new javax.swing.JList(); jButtonRecvDeal = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("信息奇偶校验信道传输模拟软件"); setBackground(java.awt.Color.orange); setBounds(new java.awt.Rectangle(0, 0, 0, 0)); setResizable(false); jLabel1.setText("传输信息:"); jTextFieldInfo.setMaximumSize(new java.awt.Dimension(6, 21)); jTextFieldInfo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldInfoActionPerformed(evt); } }); jLabelSendDis.setForeground(new java.awt.Color(255, 0, 51)); jLabelSendDis.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabelSendDis.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); buttonGroup1.add(jRadioButtonOdd); jRadioButtonOdd.setText("奇校验"); jRadioButtonOdd.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jRadioButtonOddItemStateChanged(evt); } }); jRadioButtonOdd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButtonOddActionPerformed(evt); } }); buttonGroup1.add(jRadioButtonEven); jRadioButtonEven.setText("偶校验"); jRadioButtonEven.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jRadioButtonEvenItemStateChanged(evt); } }); jRadioButtonEven.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButtonEvenActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("宋体", 1, 14)); jLabel3.setForeground(new java.awt.Color(255, 0, 0)); jLabel3.setText("模拟发送端"); jButtonSend.setLabel("发送"); jButtonSend.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSendActionPerformed(evt); } }); jLabelDisCode.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabelDisCode.setText("加上校验之后结果显示"); jLabelDisCode.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabelDisCode.setEnabled(false); jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL); jLabel4.setFont(new java.awt.Font("宋体", 1, 14)); jLabel4.setForeground(new java.awt.Color(255, 0, 0)); jLabel4.setText("模拟信道"); jLabelNetB.setForeground(new java.awt.Color(0, 51, 255)); jLabelNetB.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabelNetB.setText("信息编码被干扰后显示"); jLabelNetB.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); b1.setText("b1"); b1.setToolTipText("钩上b1将模拟对信道中传输的字节信息第一位产生干扰,使该位变为1"); b1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { b1ActionPerformed(evt); } }); b2.setText("b2"); b2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { b2ActionPerformed(evt); } }); b3.setText("b3"); b3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { b3ActionPerformed(evt); } }); b4.setText("b4"); b4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { b4ActionPerformed(evt); } }); b5.setText("b5"); b5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(jav
评论
    相关推荐
    • java swing
      绝对对你很好的帮助,
    • java swing
      关于java图形编程的教材
    • Java Swing
      java swing 游戏java swing 游戏java swing 游戏java swing 游戏
    • java swing
      java swing 自己开发java swing
    • java swing
      java swing 增删改查 ,多词查询,下载即运行,文件包括java 源码和数据库文件,打开文件,运行顺序是:login.java---run as --java application . 也可以打压成jar 包运行
    • java swing
      学习java swing的基础教材,里面有例子,可以跟着做做,对初学java swing的同志来说非常有用
    • Swing java
      Swing最牛叉的技术,分享资源,我就是做服务器的
    • java swing
      精通java swing 是一部学习java swing的好书,讲的很深,但只要有点java基础的人应该看的懂,适合java初学者.
    • java swing
      有助于你JavaSwing的学习 ++ Swing读书笔记 1-3:版面管理器(Layout Menager) |BorderLayout |FlowLayout |GridLayout AWT----|CardLayout |GridBagLayout Swing--|BoxLayout 1-3-1:BorderLayout的使用: ...
    • Javaswing.zip
      可以查看,增加自己需要记住的联系人,里面还有备忘录,使用时需要连接数据库