Hi User with Grid Layout
//HiUserGrid.java
//Demonstrates basic grid layout, beautifying things
import java.awt.*;
import java.applet.*;
public class HiUserGrid extends Applet{
Label lblOutput = new Label("enter your name");
TextField txtInput = new TextField("anonymous");
Button btnClickMe = new Button("Click Me");
public void init(){
this.setLayout(new GridLayout(0, 1));
this.add(lblOutput);
this.add(txtInput);
this.add(btnClickMe);
lblOutput.setForeground(Color.RED);
lblOutput.setBackground(Color.YELLOW);
lblOutput.setAlignment(Label.CENTER);
Font myFont = new Font("Serif", Font.PLAIN, 30);
lblOutput.setFont(myFont);
} // end init
} // end HiUserGrid