/** Create and add Clippy's output text */ public void addClippyTxt() { clippyTxt.setLineWrap(true); clippyTxt.setWrapStyleWord(true); clippyTxt.setEditable(false); clippyTxt.setFont(txtFont); clippyTxt.setAlignmentX(JTextArea.CENTER_ALIGNMENT); clippyTxt.setAlignmentY(JTextArea.CENTER_ALIGNMENT); clippyTxt.setBorder(null); clippyTxt.setSize(105, 35); clippyTxt.setLocation(25, 45); clippyTxt.setOpaque(false); lpane.add(clippyTxt, new Integer(1), 0); }
/** Runs the event when the user exits Clippy */ public void runExitSte() { try { clippyTxt.setVisible(false); speechLbl.setVisible(false); setComVisible(false); genImage("clippyExit"); Thread.sleep(3800); System.exit(0); } catch (InterruptedException ex) { } }
/** * Set the output text of Clippy * * @param text Clippys output text/feedback */ public void setClippyTxt(String text) { clippyTxt.setText(text); javax.swing.Timer time = new Timer(1000, null); time.start(); }
/** Creates the design and add the input field to the panel */ public void addField() { exeTxt.setBounds(55, 195, 300, 30); exeTxt.setFont(txtFont); exeTxt.setBorder(new EtchedBorder()); clipPnl.add(exeTxt); }