//
first use AWT package
import.awt.*;
//create
class
class
Diamond2{
Diamond2(){
Frame
f = new Frame();
Button
b=new button(“click me”);
//
the setBounds( int x-axis, int y-axis, int width,
int height) method is using in this example that sets the position of awt
button.
//set button position
b.setBounds(35,
120, 85, 30);
//
f.add(b);
f.setSize(280,280);
f.setLayout(null);
f.visible(true);
}
public
static void main(String args[])
{
Diamond2 f =new Diamond2();
}
}