/** * Tries to insert words into the text area. Displays a dialog if the attempt fails. * * @param words the words to insert */ public void insertWords(String words) { try { textArea.append(words + "\n"); } catch (SecurityException ex) { JOptionPane.showMessageDialog(this, "I am sorry, but I cannot do that."); ex.printStackTrace(); } }