FileDocCategorySizeDatePackage
SwingShapeMover.javaAPI DocExample7222Tue Dec 12 19:00:00 GMT 2000None

SwingShapeMover

public class SwingShapeMover extends JApplet

Fields Summary
protected static JLabel
label
DPanel
d
Constructors Summary
Methods Summary
public voidinit()

        getContentPane().setLayout(new BorderLayout());

        d = new DPanel();
        d.setBackground(Color.white);
        getContentPane().add(d);

        label = new JLabel("Drag rectangle around within the area");
        getContentPane().add("South", label);
    
public static voidmain(java.lang.String[] s)

        JFrame f = new JFrame("SwingShapeMover");
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
        });
        JApplet applet = new SwingShapeMover();
        f.getContentPane().add("Center", applet);
        applet.init();
        f.pack();
        f.setSize(new Dimension(550,250));
        f.show();