Fri Feb 08, 2013 8:22 pm
import java.awt.*;
import java.applet.Applet;
public class LabelExample extends Applet {
public void init() {
Label labelLeft = new Label();
labelLeft.setText("Left");
Label labelCenter = new Label("Center");
labelCenter.setAlignment(Label.CENTER);
Label labelRight = new Label("Right", Label.RIGHT);
//Add Components to the Applet.
setLayout(new GridLayout(0, 1));
add(labelLeft);
add(labelCenter);
add(labelRight);
validate();
}
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.