Search:

Type: Posts; User: suumpmolk

Search: Search took 0.07 seconds.

  1. Re: Getter from other class and border problem.

    That is exactly what I have done. But as I show in the picture, it is still outside.
    600 - 32 = 568. If y or x is below 568 it should be inside the frame, correct? In the picture in my post above...
  2. Re: Getter from other class and border problem.

    I wrote repaint(); inside moveImage() so it appears to be working now.



    private void moveImage(){
    int nextX = random.nextInt(600 - image.getWidth());
    int nextY =...
  3. Re: Getter from other class and border problem.

    I have followed the tutorial but I am not sure how repaint() works. This is the code I have written:



    public class Main {

    public static void main(String[] args) {

    ...
  4. Getter from other class and border problem.

    Hi, I'm new to Java and I just can't find out how to do this properly.

    I have a main class that hold the frame and paints, a class for drawing my game, and an image that is drawn too.
    I want to...
Results 1 to 4 of 4