每当我单击事件按钮时,程序就会变得无响应我的代码有问题吗?
void btnConnectActionPerformed(java.awt.event.ActionEvent evt){
try{
btnSend.setEnabled(true);
ServerSocket serverSocket = new ServerSocket(4446);
Scanner serverType = new Scanner(chatTxt.getText());
Socket clientSocket = serverSocket.accept();
InputStreamReader isr = new InputStreamReader(clientSocket.getInputStream());
BufferedReader br = new BufferedReader(isr);
PrintStream ps = new PrintStream(clientSocket.getOutputStream());
}catch (Exception ex){ex.printStackTrace();}
}