//客户端
import java.net.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
class PayrollClient extends JFrameimplements ActionListener{
privateJLabel title;
privateJLabel name;
privateJLabel salary;//应发工资
privateJLabel insurancesandfund;//三险一金
privateJLabel tax;
privateJButton gtax;
privateJTextField nt,st,it,tt;
private Socket socket;
private DataInputStream in=null;
private DataOutputStream out=null;
publicPayrollClient(){
super("税务核算");
socket=newSocket();
try{
InetAddressaddress=InetAddress.getByName("127.0.0.1");//此类表示互联网协议(IP) 地址。
InetSocketAddress socketAddress=newInetSocketAddress(address,4444);//getLocalHost() 返回本地主机
socket.connect(socketAddress);// connect(SocketAddress endpoint) 将此套接字连接到服务器
in=newDataInputStream(socket.getInputStream());//socket返回输入流
out=newDataOutputStream(socket.getOutputStream());//socket返回输出流
}catch(Exception ee){}
title=newJLabel("税额核算单");
name=newJLabel("姓名:");
salary=newJLabel("应发工资:");
insurancesandfund=newJLabel("三险一金:");
tax=newJLabel("应交税额:");
gtax=newJButton("核算");
nt=newJTextField();
st=newJTextField();
it=newJTextField();
tt=newJTextField();
&