Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
import java.awt.*;
import java.applet.*;
public class final_class extends Applet
{
public void paint(Graphics g)
{
int dim = 0;
int x = 0;
int y = 0;
for (int i = 10; i > 0; i--)
{
dim = i * 10;
x = dim / 2;
y = dim * 2;
if ( i % 2 == 0)
g.setColor (Color.red);
else
g.setColor (Color.blue);
g.fillOval (x,y,dim,dim);//(y-axis, x-axis, height, width)
}
/*
int dim = 0;
for (int i = 0; i < 10; i++)
{
dim = i * 10;
g2d.drawRoundRect(dim, dim, 50, 50, dim, dim);
}
*/
}
}
import java.awt.*;
import java.applet.*;
public class final_class extends Applet
{
public void paint(Graphics g)
{
Dimension d = size();
int dimw = 0;
int dimh = 0;
int x = 0;
int y = 0;
for (int i = 10; i < 18; i++)
{
dimh = i * d.height / 20;
dimw = i * d.width / 20;
x = (700 / i);
g.drawOval (x,x,dimh,dimw);
}
}
}
ya sorry if i posted this in the wrong forum, i was not thinking. I turned in my last code there for my final but I believe that my teacher will be ok with it. stupid x - y axis crap, who needs it!?