what is bullseye explain with an examplethis is a


What is Bullseye explain with an example?

This is a easy applet that draws a series of filled, concentric circles alternating red and white, instead a bullseye.
import java.applet.*;
import java.awt.*;

public class Bullseye extends Applet {

public void paint(Graphics g) {

int appletHeight = this.getSize().height;
int appletWidth = this.getSize().width;

for (int i=8; i >= 0; i--) {
if ((i % 2) == 0) g.setColor(Color.red);
else g.setColor(Color.white);

// Center the rectangle
int rectHeight = appletHeight*i/8;
int rectWidth = appletWidth*i/8;

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: what is bullseye explain with an examplethis is a
Reference No:- TGS0285233

Expected delivery within 24 Hours