Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
problem with layout manager in applets
Not sure why the button doesn't appear on the screen. I'm drawing objects at the top of the screen using the paint method. But i also want buttons to appear at the bottom of the screen. Could someone please help me thanks.
private JButton BStart;
private BorderLayout Layout;
public void init()
Layout = new BorderLayout(1,1);
Container c = getContentPane();
BStart = new JButton("START");
c.add(BStart, BorderLayout.SOUTH ); // Adding button to screen
offscreen = createImage(580, 450);
bufferGraphics = offscreen.getGraphics();
myBall= new Ball(100,100);
sound1 = getAudioClip(
0 · ·