Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

requesting all components at a Point

 
Manuel Moons
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Is there a way to request all Components at a Point in another component.
I have a LayeredPane and I want to show all Components at a location (where the user clicks).
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Component[] Container.getComponents()
and
boolean Component.contains(Point)
might help you.
 
Manuel Moons
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved it. I thought there would be some kind of method for this in SwingUtilities but there isn't so:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic