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
{ ///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
^_^个人见解^_^
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();
}
}