How do you check a constantly changing int from another class.
So I have this class called Claw and the object in it is always moving along the x axis of the jframe.
I need to know how to check the consistently changing x axis to see if it goes past a certain number like 450 for example, and if this happens I need a boolean called something (e.g private boolean pastpoint;) to become true but this all needs to happen in the Jpanel to be of any use to what I want to do but I cant seem to figure out how to do this. So I guess... how would I do this, any code examples or hints would be much appreciated.
Here is where I think my pos.x can be taken from, but if it isint .
Code:
public Claw(int x, int y) {
pos = new Point(x, y);
direction = STOP;
}
I got something in the jpanel which sets where the objects starting point is, maybe it can be checked for change as well, really not sure how to do this.
Code:
yourClaw = new Claw(250, 0);
Oh and if anyone could tell me how to lock the option to re size the game window that would be cool too :)