P
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class app1 extends Applet implements ActionListener
{
Label l1;
public void init()
{
l1=new Label("");
Button b1=new Button("ok");
add(l1);
add(b1);
b1.addActionListener(this);
}
public void paint(Graphics g)
{
g.drawString("mother mary",50,50);
}
public void actionPerformed(ActionEvent e)
{
Object obj=e.getActionCommand();
if(obj=="ok")
{
l1.setText("Ave maria");
l1.setBounds(100,100,100,100);
}
}
}
/**/
rint a text in particular place