Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
To Draw Various Shapes Using Applet In Java Program
WhatsApp
Senthilvelan Sambamoorthy
Aug 20
2016
33.6
k
0
0
shap.rar
import
java.awt.*;
import
java.applet.*;
public
class
shap
extends
Applet
{
public
void
paint(Graphics g)
{
g.drawLine(
25
,
25
,
100
,
25
);
g.drawRect(
25
,
40
,
100
,
50
);
g.fillRect(
145
,
40
,
100
,
50
);
g.drawRect(
265
,
40
,
50
,
50
);
g.drawRoundRect(
25
,
125
,
100
,
50
,
15
,
15
);
g.fillRoundRect(
145
,
125
,
100
,
50
,
15
,
15
);
g.drawOval(
25
,
205
,
100
,
50
);
g.fillOval(
145
,
205
,
100
,
50
);
g.drawOval(
265
,
205
,
50
,
50
);
g.draw3DRect(
25
,
280
,
100
,
50
,
true
);
g.draw3DRect(
145
,
280
,
100
,
50
,
false
);
g.drawArc(
25
,
345
,
100
,
50
,
25
,
75
);
g.drawArc(
145
,
345
,
100
,
50
,
125
,
75
);
}
}
/* <applet code = "shap.class" height = 500 width =500>
</applet> */
Draw Various Shapes
Applet In Java Program
Java
Up Next
To Draw Various Shapes Using Applet In Java Program