vax.swing.JTextArea;importjavax.swing.JTextField;lassPortScanWindimplementsActionListener,Runnable{privateJFramewind; //构建窗口privateJTextFieldjtf,jtf2,jtf3; //3个文本privateJLabel[]label=newJLabel[6]; //6个标签privateintstartPort,endPort;//Addresshost;//取得本机IPprivateJButtonbtn,stop;//点击事件privateJTextAreajta,jta2; //2个显示纯文本的多行区域privateJScrollPanejspane,jspane2;//滚动条privateThreadps;privateList<String>list;publicPortScanWind(){wind=newJFrame("端口扫描程序");wind.setSize(400,600);jta=newJTextArea(10,10);jta2=newJTextArea(10,10);jspane=newJScrollPane(jta);jspane2=newJScrollPane(jta2);//两个竖直滚动条list=newArrayList<String>();jtf=newJTextField(20);jtf2=newJTextField(20);jtf3=newJTextField(20);//20个字符label[0]=newJLabel("端口扫描程序");label[1]=newJLabel("主机地址:");label[2]=newJLabel("开始端口号:");label[3]=newJLabel("结束端口号:");