//LabelMania //Demonstration of Label Constructors //Andy Harris, 04/00 import java.awt.*; import java.applet.*; public class LabelMania extends Applet { public void init(){ //use the simplest (no param) constructor Label firstLabel = new Label(); //use the 'one string' constructor Label secondLabel = new Label("This is the second label"); //use the 'string and alignment' constructor Label thirdLabel = new Label("Centered"); //put the labels on the applet add(firstLabel); add(secondLabel); add(thirdLabel); } // end init } // end labelMania