Rudra
Rudra

Reputation: 1

.java uses or overrides a deprecated API.& Recompile with -Xlint:deprecation for details

.java uses or overrides a deprecated API. Recompile with -Xlint:deprecation for details.

import java.awt.*; 

import java.applet.*;

public class aprg4 extends Applet  
{
    public void init() 
    {
            setBackground (Color.yellow);
    }
    public void paint (Graphics g)
    {
            Dimension d = this.getSize();
            int xc = d.width/2;
            int yc = d.height/2;
            int r = 100;
            g.setColor (Color.red);
            g.fillOval(xc-r, yc-r,2*r,2*r);
     }
}

/*
 <applet code=aprg4 width=600 height=400>
</applet>
 Not able to check applet
*/

Upvotes: 0

Views: 139

Answers (0)

Related Questions