CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Aug 1999
    Posts
    492

    JLayeredPane : How to get component at a specific point and ignore a layer

    I am working on an application that uses a JLayeredPane. I'm using the drag layer for a "drag-n-move" operation and I would like to determine what other child component the drag is occurring upon.

    getComponentAt() is what I was using, however it will always return the item in the drag layer that's currently being moved because it's always going to be under the cursor!

    Considering the drag layer is intended to be used for dragging stuff around I find it rather surprising that the JLayeredPanel has no default or special version of getComponentAt() to handle situations like these.

    I think from the member functions of JLayeredPanel and Component I can build my own version of a function like this, but I'm surprised one doesn't already exist.
    Last edited by SteveS; March 27th, 2012 at 11:48 AM. Reason: JLayeredPane
    Why are the "tolerant" so easy to offend?

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured