Ok so turns out I'm supposed to import java.applet.Applet and extend Applet instead of JApplet since I'm drawing circles and don't need any components. I did this and my problem's fixed! Just 1...
Type: Posts; User: gauravk
Ok so turns out I'm supposed to import java.applet.Applet and extend Applet instead of JApplet since I'm drawing circles and don't need any components. I did this and my problem's fixed! Just 1...
I'm not sure I understand what you mean. Could you please explain what I can do to have only 1 circle showing? The purpose of this program is to randomly generate 50 circles of random radius and...
This is really strange, I used your codes and removed the four other instances of circles and I STILL got 2 circles. Maybe there's a problem with the Applet viewer?
int startX = generator.nextInt(120);
int startY = generator.nextInt(105);
int circleRad = generator.nextInt(90);
^those are the declarations. The 120, 105, and 90 are the maximum random integer...
Hi I could use some helps with drawing a random circle. My code is as follows:
import java.awt.*;
import javax.swing.JApplet;
import java.util.Random;
public class Circles extends JApplet
{...