public void getTitleFromGenre(ArrayList<Book> b, String g, JTextArea t) {
        t.setText("");
        boolean exists = false;
        for (Book c : b) {
            if (c.getGenre().equalsIgnoreCase(g)) {
                exists = true;
                t.append(c.getbookTitle() + "\n");
            } 
        }
        if (!exists) {
            t.append("Genre not found");
        }
    }