if (newNickname.length() > 30) { newNickname = newNickname.substring(0, 30); }
    private void changeNick() {        String newNickname;        newNickname = JOptionPane.showInputDialog(theApp, nicknameString, nickname);        if (newNickname != null) {            if (toServer != null) {                Component aComponent = tabbedPane.getComponentAt(0);                ( (InitPanel) aComponent).setTitleArea(newNickname +                    " connected to: " +                    host + ":" + port);                parseSendToCommand("NICK " + newNickname);                nickname = newNickname;            }        }    }