/*------------------ rep10ans.java Applet:国旗 -------------------*/ import java.applet.*; import java.awt.*; /* */ public class rep10ans extends Applet { public void paint(Graphics g) { // 日本の国旗 g.drawRect(20, 20, 260, 200); g.setColor(Color.red); g.fillOval(100, 70, 100, 100); // セイシェル共和国の国旗 g.fillRect(20, 240, 260, 200); int x[] = { 20, 107, 20}; int y[] = {240, 240, 440}; g.setColor(Color.blue); g.fillPolygon(x, y, 3); x[0] = 107; x[1] = 194; x[2] = 20; y[0] = 240; y[1] = 240; y[2] = 440; g.setColor(Color.yellow); g.fillPolygon(x, y, 3); x[0] = 280; x[1] = 280; x[2] = 20; y[0] = 306; y[1] = 373; y[2] = 440; g.setColor(Color.white); g.fillPolygon(x, y, 3); x[0] = 280; x[1] = 280; x[2] = 20; y[0] = 373; y[1] = 440; y[2] = 440; g.setColor(Color.green); g.fillPolygon(x, y, 3); g.setColor(Color.black); g.drawRect(20, 240, 260, 200); // トルコ共和国の国旗 g.setColor(Color.red); g.fillRect(20, 460, 260, 200); g.setColor(Color.white); g.fillOval(70, 505, 110, 110); g.setColor(Color.red); g.fillOval(91, 515, 90, 90); g.setColor(Color.white); int s[] = {178, 186, 186, 191, 200, 194, 200, 191, 186, 186}; int t[] = {560, 557, 547, 555, 551, 560, 569, 565, 573, 563}; g.fillPolygon(s, t, 10); g.setColor(Color.black); g.drawRect(20, 460, 260, 200); } }