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

    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
    Northern Virginia, United States
    Rep Power

    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).

    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, 10:12 PM
  2. Replies: 3
    Last Post: 02-05-2012, 06:10 AM
  3. Replies: 4
    Last Post: 12-31-2010, 12: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, 10:04 PM
  5. Change the Font Size and Text Position
    By stayfierce in forum New To Java
    Replies: 1
    Last Post: 12-03-2009, 05: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