If anyone can help. I was experimenting with graphics in java and was trying to get my oval shapes filled with color. The way the program is now. I get the three circles drawn but they do not fill with colors. Also, the lines created with draw lines are not appearing. What am I leaving out or not doing correctly?
Code://Program done as an applet import javax.swing.JApplet; import java.awt.*; public class Picture extends JApplet { public void paint (Graphics page) { setBackground (Color.cyan); page.setColor (Color.blue); page.fillOval (75, 65, 60, 60); page.setColor (Color.green); page.fillOval (150, 45, 60, 60); page.setColor (Color.red); page.fillOval (225, 65, 60, 60); page.drawline (75, 140, 90, 190); page.drawline (150, 210, 120, 190); page.drawline (225, 285, 150, 190); } }




Reply With Quote