0
Can anyone help me with this code? I'm getting a compile time error as depricated API
import java.applet.Applet; import java.awt.Graphics; /* <applet code="HelloWorld" width=200 height=60> </applet> */ // HelloWorld class extends Applet public class HelloWorld extends Applet { // Overriding paint() method @Override public void paint(Graphics g) { g.drawString("Hello World", 20, 20); } }
2 Respuestas
+ 1
You have to use JDK 8 or any older versions to use Applet and Graphics because they are deprecated and are not supported by the new versions of JDK.
0
Thanks