Search:

Type: Posts; User: gauravk

Search: Search took 0.09 seconds.

  1. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    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...
  2. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    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...
  3. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    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?
  4. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    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...
  5. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    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
    {...
Results 1 to 5 of 5