@Override
                public void actionPerformed(ActionEvent e) {
                    int r = table.getSelectedRow();
                    if (r == -1) return;
                    int row = table.convertRowIndexToModel(table.getSelectedRow());
                    String chan = (String) model.getValueAt(row, 1);

                    int index = Connection.findTab(chan, channel.connection); //if already in channel
                    if (index != -1) {
                        tabbedPane.setSelectedIndex(index);
                        return;
                    }

                    try {
                        channel.connection.send("JOIN " + chan);
                    } catch (IOException | BadLocationException ex) {
                        Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }