FileDocCategorySizeDatePackage
HelloSwingApplet.javaAPI DocExample979Tue Dec 12 18:59:14 GMT 2000None

HelloSwingApplet

public class HelloSwingApplet extends JApplet

Fields Summary
Constructors Summary
public HelloSwingApplet()

        getRootPane().putClientProperty("defeatSystemEventQueueCheck",
                                        Boolean.TRUE);
    
Methods Summary
public voidinit()

        JLabel label = new JLabel(
                           "You are successfully running a Swing applet!");
        label.setHorizontalAlignment(JLabel.CENTER);

        //Add border.  Should use createLineBorder, but then the bottom
        //and left lines don't appear -- seems to be an off-by-one error.
        label.setBorder(BorderFactory.createMatteBorder(1,1,2,2,Color.black));

        getContentPane().add(label, BorderLayout.CENTER);