日期:2014-05-20  浏览次数:20726 次

界面
package   meeting;

import   java.awt.*;
import   java.awt.event.*;
import   javax.swing.*;
import   java.net.*;
          public   class   MeetFrame   extends   JFrame{
          private   JPanel   contentPane;
          private   TextField   textField1=new   TextField();
          private   TextField   textField2=new   TextField();
          private   TextField   textField3=new   TextField();
          private   Button   button1=new   Button();
              private   Button   button2=new   Button();
              private   Label   label1=new   Label();
              private   Label   label2=new   Label();
              private   Label   label3=new   Label();
              private   TextArea   textArea1=new   TextArea();
              int   port;
              MulticastSocket   socket;
              InetAddress   group;
              DatagramPacket   packet;
              String   user=new   String();
              boolean   connected=false;
        /**   Creates   a   new   instance   of   Main   */
        public   MeetFrame()   {
                 
                enableEvents(AWTEvent.WINDOW_EVENT_MASK);
                try{
                         
                toInit();
                }catch(Exception   e)
                {
                e.printStackTrace();
                }
        }
       
      private   void   toInit()   throws   Exception
      {
      contentPane=(JPanel)   this.getContentPane();
      contentPane.setLayout(null);
      this.setSize(new   Dimension(300,300));
      this.setTitle( "netmeeting ");
      textField1.setBounds(new   Rectangle(90,260,200,20));
      textField2.setBounds(new   Rectangle(90,20,65,20));
      textField3.setBounds(new   Rectangle(210,20,80,20));
      textField1.setText( "224.0.0.1 ");
      label1.setBounds(new   Rectangle(20,260,60,20));
      label1.setBounds(new   Rectangle(10,20,60,20));
      label1.setBounds(new   Rectangle(160,20,40,20));
      label1.setText( "input   message ");