private void GenreSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GenreSearchButtonActionPerformed
        try {
            userSocket = new Socket("127.0.0.1", 6666);
            out = new PrintWriter(userSocket.getOutputStream(), true);
            in = new BufferedReader(new InputStreamReader
                                        (userSocket.getInputStream()));

            String search = GenreTextField.getText();
            String movReturn;
            boolean argument;

            argument = Pattern.compile("[a-zA-z].*").matcher(search).matches();

            if (argument) {
                out.println("1!" + search);
                int x = 0;

                try {
                    movReturn = in.readLine();
                    if (movReturn.equals("0")) {
                        throw new noGenreException();
                    } else {
                        String columnNames[] = {"Movie", "Genre"};
                        String[] genreArray = movReturn.split("!");
                        Object rows[][] = new Object[(genreArray.length)][2];

                        for (int i = 0; i < genreArray.length; i++) {
                            if (i % 2 == 0) {
                                rows[x][0] = genreArray[i];
                            } else {
                                rows[x][1] = genreArray[i];
                            }
                            if (i % 2 != 0) {
                                x++;
                            }
                        }
                        SearchTable = new JTable(rows, columnNames);
                        SearchScrollPane.getViewport().add(SearchTable);
                    }
                } catch (IOException e) {
                    JOptionPane.showMessageDialog(null, e, "Error", 0);
                } catch (noGenreException e) {
                    JOptionPane.showMessageDialog
                            (null, "Genre does not exist.", "Error", 0);
                }
            } else {
                JOptionPane.showMessageDialog
                            (null, "No input in textbox", "Message", 0);
            }
        } catch (IOException e) {
            JOptionPane.showMessageDialog(null, e, "Error", 0);
        }
    }//GEN-LAST:event_GenreSearchButtonActionPerformed