import PhotoStub; import java.awt.*; import java.io.File; /** * Tests our PhotoStub class. * * @version 1.0 of 10/26/99 * @author Gail Bonath * @author Joe Pipkins * @author Minna Mahlab * @author Kate Ducey */ public class TestPhoto { public static void main(String[] args){ SimpleOutput out = new SimpleOutput(); PhotoStub test = new PhotoStub("grin"); out.print("Can you get the picture? "); try { test.getPhoto(); } // try catch (Exception e) { out.println("Nope. Stupid code..."); } //catch out.println("Yup."); out.print("Can you set the picture? "); if (test.setPhoto(Toolkit.getDefaultToolkit().getImage("/home/ducey/cs152/project/grin.jpg"))) { out.println("Yup."); } // if else { out.println("Nope. Stupid Code..."); } // else test.displayPhoto(); } // main } // TestPhoto