0% found this document useful (0 votes)
10 views3 pages

FJP Exp 10

Java code

Uploaded by

badhednyandeep04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

FJP Exp 10

Java code

Uploaded by

badhednyandeep04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Name : Dnyandeep Nitin badhe

Batch : D2
Roll No. : 304D034
Experiment No. 10

Code :

package company;

import java.applet.Applet; import


java.awt.Graphics;
import java.awt.Color;

public class AppletDemo extends Applet {

public void paint(Graphics g) {

setBackground(Color.WHITE);
g.setColor(Color.BLUE);
g.drawOval(50, 50, 100, 50);
g.setColor(Color.CYAN);
g.fillOval(200, 50, 100, 50);
g.setColor(Color.GREEN);
g.drawRect(50, 150, 100, 50);
g.setColor(Color.MAGENTA);
g.fillRect(200, 150, 100, 50);
g.setColor(Color.RED);
g.drawOval(50, 250, 50, 50);
g.setColor(Color.BLACK);
g.drawLine(50, 350, 200, 350);
g.setColor(Color.ORANGE);
g.drawArc(50, 400, 100, 100, 0, 180);
g.setColor(Color.YELLOW);
g.fillArc(200, 400, 100, 100, 0, 90);
g.setColor(Color.BLACK);
g.drawString("Applet Demo with Shapes!", 50, 500);

}
Output :

You might also like