public class JpaneFrame extends JFrame implements ActionListener/////警告:the classserializeable Jpane
{                                                               ///Framedoes not declare a static  final                                                           ///serialvertionUID filed of type long
TextArea pubtalkarea,pritalkarea;                       ///这是用(ECLIPSE编译)可运行.
JButton send;
JButton delete;                                        ///但是用JDK会抛个异常.不能运行.
BufferedReader   in; 
String Clientdata=null;
 String Serverdata=null;
//Socket   s; 
PrintWriter   out; 
// InetAddress localhost;
     Container contrainer=getContentPane();
      JpaneFrame(){
      super("聊天窗口");
      this.setSize(260, 400);
     // this.setBackground(Color.yellow);
      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   }
}   
     }/////////////////////24

解决方案 »

  1.   

    PrintWriter  out;这个定义是干什么用的,如果是输出  JpaneFrame 应该将他序列化,继承public interface Serializable接口,
    ^_^个人见解^_^  
      

  2.   

    import java.awt.Container;
    import java.awt.TextArea;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.BufferedReader;
    import java.io.PrintWriter;import javax.swing.JButton;
    import javax.swing.JFrame;class JpaneFrame extends JFrame implements ActionListener {// ///警告:the classserializeable Jpane  // /Framedoes not declare a static final ///serialvertionUID filed of type long
      TextArea pubtalkarea, pritalkarea; // /这是用(ECLIPSE编译)可运行.  JButton send;  JButton delete; // /但是用JDK会抛个异常.不能运行.  BufferedReader in;  String Clientdata = null;  String Serverdata = null;  // Socket s;
      PrintWriter out;  // InetAddress localhost;
      Container contrainer = getContentPane();  JpaneFrame() {
        super("聊天窗口");
        this.setSize(260, 400);
        // this.setBackground(Color.yellow);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
      }  @Override
      public void actionPerformed(ActionEvent e) {
        // TODO Auto-generated method stub  }  public static void main(String[] args) {
        new JpaneFrame();
      }
    }
      

  3.   

    PrintWriter     out这个是我准备用来向流里面写东西的.用于与服务器通信.
      

  4.   

    高手,怎么样把JpaneFrame序列化??对不起,我是JAVA初学者.