Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Jaclyn Jardell
- * Chapter 14.5 Program
- *
- * @(#)Chapter14.5Program.java
- *
- * Chapter14.5Program Applet application
- *
- * @author
- * @version 1.00 2014/11/23
- */
- import java.awt.*;
- import java.applet.*;
- public class Chapter14_5Program extends Applet
- {
- public void init()
- {
- }
- public void paint(Graphics g) {
- g.drawString("Welcome to Java!!", 50, 60 );
- boolean onOff = true;
- int x;
- int y;
- int heightWidth;
- g.setColor(Color.blue);
- g.drawOval(0, 0, 500, 500);
- g.drawOval(0, 500, 500, 0);
- for(x = 250; y = 250; heightWidth= 10; x > 10; x-= 10; y -= 10; heightWidth += 20)
- {
- g.drawOval(x, y, heightWidth, heightWidth);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement