Get Child At Point : Container « Swing JFC « Java






Get Child At Point

   

import java.awt.Component;
import java.awt.Container;
import java.awt.Point;


public class Util{
  
  public static final Component getChildAt(Container container, Point p) {
    Component c = container.getComponentAt(p);
    return c == null || c.getParent() != container ? null : c;
  }

}

   
    
    
  








Related examples in the same category

1.Container Event DemoContainer Event Demo
2.ContainersContainers
3.Get Child At Line
4.Get Component Index
5.Get Visible Child At
6.Get Visible Children Count
7.Find Component Under Glass Pane At
8.Find First Component Of Type
9.Count Components in a Container
10.Has Visible Children
11.Is Only Visible Component
12.Get All Components in a container
13.Container which can transform its children
14.Is Within Parent