Chapters 2-5 javax.swing package of GUI components JOptionPane .showMessageDialog(null, String message) .showMessageDialog(null, String message, String title, JOptionPane.dialog type) .showMessageDialog(null, JTextArea ref, String title, JOptionPane.dialog type) .showMessageDialog(null, JScrollPane ref, String title, JOptionPane.dialog type) JOptionPane--JScrollPane--JTextArea--String ERROR_MESSAGE INFORMATION_MESSAGE is the default for showMessageDialog WARNING_MESSAGE QUESTION_MESSAGE PLAIN_MESSAGE you get different icons with the different message types (except PLAIN_MESSAGE has no icon) .showInputDialog(String prompt) returns String .showConfirmDialog(null, String message, String title, JOptionPane.YES_NO_OPTION) returns int JOptionPane.YES_OPTION or JOptionPane.NO_OPTION JTextArea mytextarea = new JTextArea() JTextArea mytextarea = new JTextArea(rows, cols) mytextarea.setLineWrap(true/false) mytextarea.setFont(Font) mytextarea.setText(String) mytextarea.append (String) myTextArea.setBorder( BorderFactory.createLineBorder( Color.RED ) ) scrollbar for a textarea: JScrollPane myscrollpane = new JScrollPane(mytextarea) Applets java.awt.Graphics //drawing methods javax.swing.JApplet public class MyCoolApplet extends JApplet { public void init() { //called once when applet frist starts //typically to initialize fields and create GUI //optional } public void paint (Graphics g) { super.paint(g); //clears applet area //called after init and start and whenever screen needs refreshing g.drawString(String,x,y) g.drawLine(x1,y1,x2,y2) g.drawRect(x,y,width,height) g.drawOval(x1,y1,width,height) //bounding box } } .html file ******************************* Important sections, pages, examples: 2.4 2.5 3.3 3.5 p 153 p 178,9 p 183,4 p 197,8