1 import java.awt.*; 2 3 4 class NextFramePositionCalculator { 5 6 private final Frame currentFrame; 7 8 public NextFramePositionCalculator(Frame currentFrame) { 9 this.currentFrame = currentFrame; 10 } 11 12 public int getNextLocationX() { 13 return currentFrame.getX() + currentFrame.getWidth(); 14 } 15 16 public int getNextLocationY() { 17 return currentFrame.getY(); 18 } 19 20 }