911 I NEED HELP ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

been trying to write a simple Java GUI assignment for almost a week nw and am stock i ve 2 submit tomorrow my friend jus introduced me 2 dis site pls help this is d code

mport java.awt.*;

import java.awt.event.*;

class ButtonTest extends Frame

{

Button btnCake= new Button("Cake");

Button btnChocs= new Button("Chocs");

Button btnBurger= new Button("Burger");

public ButtonTest (String title)

{

super(title);

setLayout(new FlowLayout());

add(btnCake);

add(btnChocs);

add(btnBurger);

addWindowListener(new WindowAdapter()

{

public void windowClosing(WindowEvent go)

{

setVisible(false);

System.exit(0);

}

});

}

public static void main(String args[])

{

ButtonTest yinka= new ButtonTest("The 3 little buttons");

yinka.setSize(500,500);

yinka.show();

}

}

but it keeps saying ButtonTest.java uses or overrides a depreciated API

when i try to compile what am i doing wrong

[1066 byte] By [africanchica] at [2007-11-27 10:48:06]
# 1

It is only a warning and can be ignored.

sabre150a at 2007-7-28 22:24:25 > top of Java-index,Desktop,Core GUI APIs...
# 2

911? ASAP? are you dying? Sorry but the OR is full.

Yannixa at 2007-7-28 22:24:25 > top of Java-index,Desktop,Core GUI APIs...
# 3

Check API documentation.

dhaval04a at 2007-7-28 22:24:25 > top of Java-index,Desktop,Core GUI APIs...
# 4

As sabre says, it is a warning, you can ignore it. If you want to see what is actually causing the warning that run javac with the "-deprecation" argument (as the original warning message told you) and it will point you to the exact spot. Then check the API documentation to find out what that method (or whatever) has been replaced with (if anything).

masijade.a at 2007-7-28 22:24:25 > top of Java-index,Desktop,Core GUI APIs...
# 5

yinka.show(); // <-- this is deprecated

Look at the first line of your windowClosing method for a hint to the better way.

KelVarnsona at 2007-7-28 22:24:25 > top of Java-index,Desktop,Core GUI APIs...
# 6

You need to remove the chewing gum from under the exclamation mark and SHIFT keys.

java_knighta at 2007-7-28 22:24:25 > top of Java-index,Desktop,Core GUI APIs...