Code /* Deprecated2.java David Klick CIS 260 1/19/2005 This program shows how the methods getSize and setSize have been substituted in place of size and resize. It also demonstrates javadoc documentation. */ /** * Deprecated2 - a simple app to demo deprecation * Note: This is also a test of javadoc * @author Dave Klick * @version 0.9 * @see javax.swing.JOptionPane */ import javax.swing.*; import java.awt.Dimension; public class Deprecated2 { /** * main(String[]) is the only method in this app * @param args a String array of command line args */ public static void main(String[] args) { JOptionPane msg = new JOptionPane("Hello, world!"); Dimension d = msg.getSize(); System.out.println(d.width + ", " + d.height); msg.setSize(new Dimension(d.width+150, d.height+100)); d = msg.getSize(); System.out.println(d.width + ", " + d.height); JDialog dlg = msg.createDialog(null, "TestDialog"); dlg.setVisible(true); msg.setMessage("Hey ya!"); dlg.setVisible(true); System.exit(0); } }