private void GenreAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GenreAddButtonActionPerformed
        String movGenre = GenreNameTextField.getText();
        boolean isWord = true;
                System.out.println("1");
        
        isWord = Pattern.compile("[A-Z].*").matcher(movGenre).matches();
        
        if (isWord) {
                System.out.println("2");
            out.println("5!" + movGenre);
                System.out.println("3");
            try {
                String addNewGenre = in.readLine();
                System.out.println("4");
                if (addNewGenre.equals("0")) {
                    JOptionPane.showMessageDialog(null, "The genre already exists!!", "Error", 0);
                } else {
                    JOptionPane.showMessageDialog(null, "New genre added successfully!!", "Genre Added!!", 1);
                }
            } catch (IOException e) {
                JOptionPane.showMessageDialog(null, e, "Error", 0);
            }
        } else {
            JOptionPane.showMessageDialog(null, "The text fiels has no input \nor the genre name does not start with a capital letter!!", "Error", 0);
        }
    }//GEN-LAST:event_GenreAddButtonActionPerformed