Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Help with moving an object in Java?


  • Please log in to reply
No replies to this topic
chrisrieom
  • Members
  • 1 posts
  • Last active: Feb 28 2014 07:18 AM
  • Joined: 21 Feb 2014

Hello all, 
Could someone give me some advice on how to tackle this problem please - thank you in advance. So basically I have a program that paints a simple object image. There are 5 of these objects altogether and different classes and methods have been set up to do this and this works correctly. The program currently also asks the user if they would like to change the colour of this object shape, and which shape they would like to change (user inputs a number 1-5) then the program will change the colour of this shape. 

But the new task is for the user to input a number (1-5) to which shape they would like to MOVE position of. Any ideas on how this would be done? Would there need to be different methods for changePositionX, changePositionY? The user needs to input the X and Y co ordinates and then this will move the selected shape to its NEW position in the current JFRAME. 
Thank you, if any code is needed I will paste it in.

________________________

valuepointdistribution