示例#1
0
 private void jButton1ConnectActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton1ConnectActionPerformed
   try {
     client.connect("christoffer2000.cloudapp.net", 9090);
     new Thread(client).start();
   } catch (IOException ex) {
     Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
   }
 } // GEN-LAST:event_jButton1ConnectActionPerformed
示例#2
0
 /** Creates new form View */
 public View() {
   initComponents();
   client = new EchoClient();
   client.addObserver(this);
 }
示例#3
0
 @Override
 public void update(Observable o, Object o1) {
   ReceiveText.setText(client.receive());
 }
示例#4
0
 private void jButton1SendActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton1SendActionPerformed
   client.MsgOut(SendText.getText());
 } // GEN-LAST:event_jButton1SendActionPerformed