Search:

Type: Posts; User: Norm

Search: Search took 0.28 seconds.

  1. Replies
    9
    Views
    1,423

    Re: How do I delete an object from my program?

    Yes, or in an arraylist.
  2. Replies
    9
    Views
    1,423

    Re: How do I delete an object from my program?

    There will need to be some way for the paintComponent() method to know if it is to draw a shape or not.
    One way is to have a boolean that says so
    Another way is to have the shapes in a list that...
  3. Replies
    9
    Views
    1,423

    Re: How do I delete an object from my program?

    That depends on how you code the paintComponent() method. A common way is to draw everything on every call
    which means there is no erasing done. If you don't want to see a shape, don't draw it.
    ...
  4. Replies
    9
    Views
    1,423

    Re: How do I delete an object from my program?

    Put the code inside of an if statement that is true when you want it executed and false when you don't want it executed.
Results 1 to 4 of 4