Search:

Type: Posts; User: pbrockway2

Search: Search took 0.10 seconds.

  1. Replies
    42
    Views
    3,720

    Re: A beginner needs help in oop

    That's close. But you shouldn't declare Xposition again. It is already part of the Square class, so you just say:



    public static void setXposition(double x){
    Xposition = x;
    }


    Then...
  2. Replies
    42
    Views
    3,720

    Re: A beginner needs help in oop

    Sorry for the late post. I only meant that class names should start with a big (uppercase) letter: like MyPanel, Square. ("small" == a minor thing that is not the cause of your problem).
  3. Replies
    42
    Views
    3,720

    Re: A beginner needs help in oop

    Small point, but classes should begin with a capital letter like Square.

    You can't access local variables in main() - or other methods - from different places in the code. So make what you want...
Results 1 to 3 of 3