//Purpose: This applet simply creates label components import java.awt.*; import java.applet.*; import java.awt.event.*; public class test12a extends Applet{ //Set background to yellow, public void init() { setBackground(Color.yellow); setFont(new Font("Helvetical", Font.BOLD, 12)); setLayout( new GridLayout(3,1)); //3 rows 1 column grid add(new Label("Upper Left", Label.LEFT)); add(new Label("Centered", Label.CENTER)); add(new Label("Lower Right", Label.RIGHT)); } //Paint the current key at the current position public void paint(Graphics g) { //set drawing color g.setColor(Color.red); } }