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();
Type: Posts; User: Ciaran54
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();
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 ;)
...
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...
(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...
So your code:
public double fillUp() {
int i = amount;
for(i=0; i<capacity; i++) {
}
return capacity-amount;
}