• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

deprecated API [ wish to learn complete on it ]

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic