public void send() {  
        if (!isConnected) {  
            JOptionPane.showMessageDialog(null, "還未連線，不能發送訊息！", "Error",  
                    JOptionPane.ERROR_MESSAGE);  
            return;  
        }  
        String message = textField.getText().trim();  
        if (message == null || message.equals("")) {  
            JOptionPane.showMessageDialog(null, "禁止發廢文！", "Error",  
                    JOptionPane.ERROR_MESSAGE);  
            return;  
        }  
        sendMessage(frame.getTitle() + "@" + "ALL" + "@" + message);  
        textField.setText(null);  
    }