You'll need to use Swing to achieve that (without drawing 5 arcs).
Graphics2D g2d = (Graphics2D) g;
g.setStroke(new BasicStroke(5.0));
Main Topics
Browse All TopicsI am asked to draw the Olympic logo, I 've drawn the the 5 circles, and cannot get the drawArc function to work- to interlock the 5 circles.
This is what I have gotten so far:
<code>
import java.applet.Applet;
import java.awt.*;
public class Hw5Pr1 extends Applet {
public void paint(Graphics g) {
// Blue Ring
g.setColor(new Color(5, 120, 182));
g.drawOval(0, 0, 100, 100);
g.fillOval(0,0, 100, 100);
// Rectangle rect = new Rectangle( 30, 30, 100, 100);
// Color pn = new Color(5, 120, 182);
// g.drawArc(pn, rect, 50, 100);
g.setColor(new Color(255, 255, 255));
g.drawOval(5, 5, 90, 90);
g.fillOval(5, 5, 90, 90);
// Black Ring
g.setColor(new Color(0, 0, 0));
g.drawOval(110, 0, 100, 100);
g.fillOval(110, 0, 100, 100);
g.setColor(new Color(255, 255, 255));
g.drawOval(115, 5, 90, 90);
g.fillOval(115, 5, 90, 90);
// Red Ring
g.setColor(new Color(251, 24, 51));
g.drawOval(220, 0, 100, 100);
g.fillOval(220, 0, 100, 100);
g.setColor(new Color(255, 255, 255));
g.drawOval(225, 5, 90, 90);
g.fillOval(225, 5, 90, 90);
// Yellow Ring
g.setColor(new Color(255, 173, 26));
g.drawOval(50, 50, 100, 100);
g.fillOval(50, 50, 100, 100);
g.setColor(new Color(255, 255, 255));
g.drawOval(55, 55, 90, 90);
g.fillOval(55, 55, 90, 90);
// Green Ring
g.setColor(new Color(12, 137, 73));
g.drawOval(160, 50, 100, 100);
g.fillOval(160, 50, 100, 100);
g.setColor(new Color(255, 255, 255));
g.drawOval(165, 55, 90, 90);
g.fillOval(165, 55, 90, 90);
}
}
</code>
Could someone please help me draw one arc and I 'll hopefully do the rest.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
It looks very odd.
I took a snapshop of my desktop so you can get the feeling.
http://lobnan.net/Olympic.
Any suggestions?
Business Accounts
Answer for Membership
by: Coconut77840Posted on 2004-10-26 at 14:51:26ID: 12416125
I've been able to figure out how to draw the arc
<code>
g.setColor(new Color(0, 0, 0));
g.drawArc(110, 5, 95, 95, 185, 70);
</code>
Now, I need to know how to increase the number of pixels of that Arc, It can be done by drawing 10 arcs, but I guess this is not efficient as it would me quite a while.
Please advice