Hi Experts,
I am new to java,and I am trying to display the button on frame. Please find the code below
import java.awt.Button;
import java.awt.Frame;
public class ButtonDiaplay extends Frame{
public ButtonDiaplay()
{
setBounds(50,90,250,350);
setTitle("Bouncing Rect");
setResizable(true);
// setLayout(null);
Button create = new Button("Create");
setBounds(70, 100, 50, 10);
this.add(create);
setVisible(true);
} //ButtonDiaplay
public static void main(String[] args){
ButtonDiaplay display = new ButtonDiaplay();
}
}// end ButtonDisplay
On executing the code, the button is overlapping on the frame size.Can anyone let me know why this is happening?
I dono want to use Swing and Applet. Through normal AWT only I want to display my button with any given size
Also, if I set the layout as setLayout(null) then I am not able to see my button. Could anyone please explain me why on setting the layout I am not able see the button.
If I make setResizable(false),then I am seeing only the pane, I have attached screen shot in the attachment.
Waiting for the quick reply.
Thanks in advance.
