Search:

Type: Posts; User: Ciaran54

Search: Search took 0.21 seconds.

  1. Replies
    1
    Views
    1,701

    Re: paintComponent() instead of paint()

    Never mind, I solved it:

    Instead of adding GridDraw to the panel like i did here:


    GridDraw drawG = new GridDraw();
    gPanel.add(drawG);
    gPanel.add(test);
    gPanel.repaint();
  2. Re: Can someone help me fix this java program? I cant find errors but its not running

    The code works fine for me :P

    you say you are using eclipse... a console window won't pop up, check the bottom panel in the eclipse window ;)
    ...
  3. Replies
    2
    Views
    610

    Re: Feel like I'm overthinking this problem.

    x and y define the location of the rectangle. This is based on the top left corner of the container it is in to the top left corner of the shape you are drawing. As long as the width and height are...
  4. Replies
    1
    Views
    1,701

    paintComponent() instead of paint()

    (sorry, previously posted in wrong topic)

    OK, I am, as a programming rite, programming my own little version of conway's game of life, and it works fine, apart from trying to paint. I previously...
  5. Re: Java uberNoob, requesting help with simple loop issue

    So your code:

    public double fillUp() {
    int i = amount;
    for(i=0; i<capacity; i++) {
    }
    return capacity-amount;
    }
Results 1 to 5 of 5