Question:
applet writing and compiling?
lake
2011-08-18 04:21:29 UTC
i write an applet code and compile it. But it says.
Note: class.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
what does it mean?
regards!
Lake
Three answers:
Priyanka
2011-08-18 04:41:04 UTC
The error deprecated API is nothing to worry about. Your codes will compile and run fine. API stands for application programming interface. This simply means the way you are accessing the behaviors of your classes or objects.



U should run javac with the -deprecated flag. This will alert you as to which line contains the deprecated statement. Then you may look in the Javadocs to find the function and its associated replacement function.



You could do as the compiler says and recompile with -Xlint checked.



javac -Xlint YourClassName.java



When compiling the class. You can then check the API to see what has now replaced that method.



Use java.util.Scanner for getting input from the console
anonymous
2011-08-18 11:35:34 UTC
A Java applet is a special kind of Java program that a browser enabled with Java technology can download from the internet and run. An applet is typically embedded inside a web page and runs in the context of a browser. An applet must be a subclass of the java.applet.Applet class. The Applet class provides the standard interface between the applet and the browser environment.



Swing provides a special subclass of the Applet class called javax.swing.JApplet. The JApplet class should be used for all applets that use Swing components to construct their graphical user interfaces (GUIs).



The browser's Java Plug-in software manages the lifecycle of an applet.

Note: Some features of Java applets may not work as described on Mac OS. This is because of the way the Java Plug-in software interfaces with browsers on Mac OS.

Note: Please make sure you have at least Java SE Development Kit (JDK) 6 update 10 release on your client machine before proceeding further. You will need this to view the sample rich internet applications and read subsequent sections without interruptions.
Tonye J
2011-08-18 11:29:17 UTC
Its nothing to worry about in the sense that it wont affect the working of your applet, it only means that you are using a class or method in your code that has been marked by java in the current version of JDK you are using as deprecated. Deprecated means the class or method is now obsolete and there is a better and alternative class or method in the JDK.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...