• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deprecated API [ wish to learn complete on it ]

 
kaush de
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, I�m new in java� I�m learning from VDO tutorial that is bit old..
I created a file name Main.java


import java.awt.Frame;
import java.awt.Label;

public class Main extends Frame{
public static void main(String arg[]) {
new Main();
}
Main(){
Label label;
label=new Label("Howdy!");
add(label);
pack();
show();
}
}

Now when I compile it.. gives msg�...
Main.java uses or overrides a deprecated API
Recompile with Xlint epcrecation for details

Well my program runs fine� but can anybody tell me how to find out the list of other deprecated API in java & which other API takes its place.

I'm novice... but trying like anything thanks in advance.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go to the Java API documentation (for example, here), look up the class with the questionable method.

Here's it's "show()". Use "setVisible(true)" instead.
 
kaush de
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot

one i got too
http://java.sun.com/j2se/1.4.2/docs/guide/misc/deprecation/deprecation.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic