Results 1 to 2 of 2
  1. #1
    Vorpike is offline Member
    Join Date
    Jun 2013
    Posts
    6
    Rep Power
    0

    Question Would switching references change their graphical position?

    So I have an array of objects, each with their own position, I tried switch the references in the array of two objects, then repainted(immediately), but the two objects aren't switching positions on screen...does this even work?

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,036
    Rep Power
    6

    Default Re: Would switching references change their graphical position?

    Not in this case. The location of the objects is dependent on the state of the object (internals) and not the reference of the object itself. The only difference would be in the order that they were painted (for example if you iterated over the array).

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Replies: 1
    Last Post: 07-07-2012, 11:12 PM
  2. Replies: 3
    Last Post: 02-05-2012, 07:10 AM
  3. Replies: 4
    Last Post: 12-31-2010, 01:15 PM
  4. How to I change the position in arrays
    By LennyKosmos in forum New To Java
    Replies: 3
    Last Post: 09-27-2010, 11:04 PM
  5. Change the Font Size and Text Position
    By stayfierce in forum New To Java
    Replies: 1
    Last Post: 12-03-2009, 06:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •