TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
To Draw Various Shapes Using Applet In Java Program
Senthilvelan Sambamoorthy
Aug 20
2016
Code
32.7
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
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