0

.java使用或覆盖已弃用的 API。重新编译以-Xlint:deprecation获取详细信息。

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
*/
4

0 回答 0