The first thing you need to do is ask yourself why do I have all theses static methods in the first place? Remember static methods are owned by the class not instances of the class and as such they are generally used as utility methods, ie a function that does a calculation or manipulation, or in many cases they are used as factory methods to return an object of some class or interface. It should be obvious that in the static methods that you show here, since you are passing in a reference to a ShowShapes, that something isn't right. It appears that they should be parameterless instance methods instead. So instead of calling
AlterPosition(Shape); you would instead call
Shape.AlterPosition();, etc. What you do to fill the body of those methods is whatever behavior you want to accomplish. It appears that you are just dumping all of the static Shape[] array to the frame in your paint method. You will want to call
repaint() at the end of each of those methods so that the event
thread will call your
paint() method.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher