final Show show = ShowLibrary.getInstance().newShows.get(i);
final String title = show.getTitle();
final Menu showMenu = new Menu(title);
newShows.add(showMenu);
final Season season = show.getSeason();
final Episode episode = season.getEpisode();
String linkLabel = episode.getLinkLabel();
String link = episode.getLink();
//Add menu items add, remove, and link
final MenuItem addItem = new MenuItem("Move to Shows");
final MenuItem removeItem = new MenuItem("Remove & Ignore");
final MenuItem linkItem = new MenuItem(linkLabel);
showMenu.add(addItem);
showMenu.add(removeItem);
showMenu.add(linkItem);
//Add menu item functionality
addItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Show newShow = ShowLibrary.getInstance().addShow(show);
Season season = newShow.addSeason(1);
Episode episode = show.findSeason(1).findEpisode(1);
season.addEpisode(1, episode.getLink(), episode.getLinkLabel());
ShowLibrary.getInstance().newShows.remove(show);
ShowLibrary.getInstance().doUpdates();
GUI.getInstance().refresh();
}
});