GUI(){//constructor
    //Get screen resolution, width, and height
    res = Toolkit.getDefaultToolkit().
                         getScreenResolution();
    width = Toolkit.getDefaultToolkit().
                         getScreenSize().width;
    height = Toolkit.getDefaultToolkit().
                                 getScreenSize().height;
                                    
    //Display screen resolution,
    // width, and height                                   
    System.out.println(res + " pixels per inch");
    System.out.println(width + " pixels wide");
    System.out.println(height + " pixels high");



Figure 3