FileDocCategorySizeDatePackage
myInsets.javaAPI DocExample894Mon Mar 24 02:03:24 GMT 1997None

myInsets

public class myInsets extends Applet

Fields Summary
Constructors Summary
Methods Summary
public voidinit()

        setLayout (new BorderLayout ());
        add ("Center", new Button ("Insets"));
    
public java.awt.Insetsinsets()

        return new Insets (50, 50, 50, 50);
    
public voidpaint(java.awt.Graphics g)

        Insets i = insets();
        int width  = size().width - i.left - i.right;
        int height = size().height - i.top - i.bottom;
        g.drawRect (i.left-2, i.top-2, width+4, height+4);
        g.drawString ("Insets Example", 25, size().height - 25);