Results 1 to 3 of 3
  1. #1
    IAnkit is offline Member
    Join Date
    Sep 2010
    Rep Power

    Default ordering moving images in swing

    I have an app, where I display few images in a frame. We can move images.

    Images are in order they are loaded, so that if we drag one image over other than one which got loaded later, gets on the top.

    But I want the one to be dragged to get on top, irrespective of when it was loaded. (i.e irrespective of its order).
    I think I did not write well enough to clearly express my concern.

    I am using paintcomponent(). But problem is that my app allows to move/drag images over one other.

    And I want the image which is dragged to be always on top. So, if there are two images (let us say A and B), then I want A to be on top if A is dragged over B and B to be on top(visible), if B is dragged over A. If both images are at different positions, both are visible.. but if they overlap each other ,then the one which is dragged over other should remain at top.

    Hopefully I explained better this time.


  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power


    Last edited by DarrylBurke; 09-21-2010 at 07:47 AM.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Similar Threads

  1. [Applet] Clicking images & moving them.
    By Perfectworld in forum Java Applets
    Replies: 17
    Last Post: 01-16-2010, 09:09 AM
  2. Using Images in Swing
    By Chasingxsuns in forum New To Java
    Replies: 5
    Last Post: 08-01-2009, 01:22 AM
  3. Moving Images in JPanel
    By killpoppop in forum AWT / Swing
    Replies: 7
    Last Post: 03-08-2009, 03:54 PM
  4. need help in uploading images in swing program!!!
    By ashton in forum New To Java
    Replies: 10
    Last Post: 01-26-2009, 11:01 AM
  5. Default Swing Images
    By Bubba_OH in forum New To Java
    Replies: 5
    Last Post: 10-10-2008, 04:00 PM

Posting Permissions

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